[PATCH 7/7] Input: wacom - Fail on missing features

From: Bastian Blank
Date: Thu Jan 07 2010 - 13:41:28 EST


The driver needs a correct setup feature list, fail if it is not
correctly set.

Signed-off-by: Bastian Blank <waldi@xxxxxxxxxx>
---
drivers/input/tablet/wacom_sys.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 41a631b..c44b9f0 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -534,6 +534,9 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
struct input_dev *input_dev;
int error = -ENOMEM;

+ if (!features)
+ return -EIO;
+
wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL);
wacom_wac = kzalloc(sizeof(struct wacom_wac), GFP_KERNEL);
input_dev = input_allocate_device();
--
1.6.5.7


--
Well, Jim, I'm not much of an actor either.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/