Input: bu21013_ts - fix null dereference in error handling
authorDan Carpenter <error27@gmail.com>
Thu, 28 Oct 2010 22:09:28 +0000 (15:09 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 29 Oct 2010 05:33:07 +0000 (22:33 -0700)
bu21013_data could be NULL so better not reference it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/bu21013_ts.c

index ccde586025632671d5ea6279b89a3602262600a3..2ca9e5d6646028c428ec06fd525ad971629d98a2 100644 (file)
@@ -514,7 +514,7 @@ err_free_irq:
 err_cs_disable:
        pdata->cs_dis(pdata->cs_pin);
 err_free_mem:
-       input_free_device(bu21013_data->in_dev);
+       input_free_device(in_dev);
        kfree(bu21013_data);
 
        return error;