mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Input: wacom - check for allocation failure in probe()
We accidentally removed the check for NULL in 3aac0ef10b "Input: wacom - isolate input registration". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
993808253c
commit
f182394033
@ -1002,6 +1002,8 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL);
|
wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL);
|
||||||
|
if (!wacom)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
wacom_wac = &wacom->wacom_wac;
|
wacom_wac = &wacom->wacom_wac;
|
||||||
wacom_wac->features = *((struct wacom_features *)id->driver_info);
|
wacom_wac->features = *((struct wacom_features *)id->driver_info);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user