From ce16a474f6305dd631c885ba970d5746e4d5c803 Mon Sep 17 00:00:00 2001 From: Chris Leech Date: Wed, 17 Nov 2010 23:59:54 -0800 Subject: Input: qt602240_ts - fix wrong sizeof in object table allocation 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 Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/qt602240_ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/touchscreen') diff --git a/drivers/input/touchscreen/qt602240_ts.c b/drivers/input/touchscreen/qt602240_ts.c index 125e50ddef7..4dcb0e872f6 100644 --- a/drivers/input/touchscreen/qt602240_ts.c +++ b/drivers/input/touchscreen/qt602240_ts.c @@ -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"); -- cgit v1.2.3-70-g09d2