From: Dan Carpenter Date: Fri, 30 Mar 2012 05:38:11 +0000 (-0700) Subject: Input: wacom - check for allocation failure in probe() X-Git-Tag: accepted/tizen/common/20141203.182822~153^2~155 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f182394033d639679264d61e6dca62761e659ff7;p=platform%2Fkernel%2Flinux-arm64.git 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 Reviewed-by: Chris Bagwell Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 19ba586..0d26921 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -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);