]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
Input: qt602240_ts - fix wrong sizeof in object table allocation
authorChris Leech <christopher.leech@linux.intel.com>
Thu, 18 Nov 2010 07:59:54 +0000 (23:59 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 18 Nov 2010 08:17:12 +0000 (00:17 -0800)
The kcalloc call for the object table is using sizeof(struct qt602240_data)
when it should be using sizeof(struct qt6602240_object), resulting in a larger
allocation than is required.

Signed-off-by: Chris Leech <christopher.leech@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/qt602240_ts.c

index 125e50ddef7f39f7ff26f8ffccdd3ab26b75f036..4dcb0e872f6a811d5628b58adb22a3ca9213336e 100644 (file)
@@ -969,7 +969,7 @@ static int qt602240_initialize(struct qt602240_data *data)
                return error;
 
        data->object_table = kcalloc(info->object_num,
-                                    sizeof(struct qt602240_data),
+                                    sizeof(struct qt602240_object),
                                     GFP_KERNEL);
        if (!data->object_table) {
                dev_err(&client->dev, "Failed to allocate memory\n");