diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-03-30 07:38:11 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-03-30 07:42:19 +0200 |
commit | f182394033d639679264d61e6dca62761e659ff7 (patch) | |
tree | e47443baa512862a135e020572c123dd07eacd95 /drivers | |
parent | Merge branch 'next' into for-linus (diff) | |
download | linux-f182394033d639679264d61e6dca62761e659ff7.tar.xz linux-f182394033d639679264d61e6dca62761e659ff7.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 19ba58640dc2..0d269212931e 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); |