Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1823940 authored by Dan Carpenter's avatar Dan Carpenter Committed by Dmitry Torokhov
Browse files

Input: wacom - check for allocation failure in probe()



We accidentally removed the check for NULL in 3aac0ef1 "Input: wacom -
isolate input registration".

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarChris Bagwell <chris@cnpbagwell.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 99380825
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1002,6 +1002,8 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
		return -EINVAL;

	wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL);
	if (!wacom)
		return -ENOMEM;

	wacom_wac = &wacom->wacom_wac;
	wacom_wac->features = *((struct wacom_features *)id->driver_info);