Unverified Commit 3ab0788c authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents a37b8248 8e2c4ce5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -48,6 +48,9 @@ int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots,
		return 0;
	if (mt)
		return mt->num_slots != num_slots ? -EINVAL : 0;
	/* Arbitrary limit for avoiding too large memory allocation. */
	if (num_slots > 1024)
		return -EINVAL;

	mt = kzalloc(struct_size(mt, slots, num_slots), GFP_KERNEL);
	if (!mt)