Message ID | 5088a905-4f29-41d3-a96e-5b66aad551f1@web.de |
---|---|
State | New |
Headers | show |
Series | Input: MT - Return directly after a failed kzalloc() in input_mt_init_slots() | expand |
>> Thus return directly after a call of the function “kzalloc” failed >> at the beginning. > > This is not needed. The same arguments as on the patch to > usbtouchscreen.c. I suggest to avoid redundant data processing a bit more. Regards, Markus
diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c index 14b53dac1253..24064447d600 100644 --- a/drivers/input/input-mt.c +++ b/drivers/input/input-mt.c @@ -49,7 +49,7 @@ int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots, mt = kzalloc(struct_size(mt, slots, num_slots), GFP_KERNEL); if (!mt) - goto err_mem; + return -ENOMEM; mt->num_slots = num_slots; mt->flags = flags;