Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933164AbcJMQc4 (ORCPT ); Thu, 13 Oct 2016 12:32:56 -0400 Received: from mout.web.de ([212.227.15.3]:64727 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756964AbcJMQbF (ORCPT ); Thu, 13 Oct 2016 12:31:05 -0400 Subject: [PATCH 08/18] [media] RedRat3: Improve another size determination in redrat3_send_cmd() To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , Sean Young , Wolfram Sang References: <566ABCD9.1060404@users.sourceforge.net> <81cef537-4ad0-3a74-8bde-94707dcd03f4@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <1bfa8542-0bcb-eea6-0dda-d1c7ffae89f1@users.sourceforge.net> Date: Thu, 13 Oct 2016 18:29:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <81cef537-4ad0-3a74-8bde-94707dcd03f4@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:bjPPXRbcXTlSYBPq1bB6c3oX4uJRXeGPvalph+tQN/xeKKJHh/P J+Jd1jDo9mA385CQ4pyYPMkMGrVi8pEY2NJ2289igNhaKSKwJrgR7LJH17GFlF3tIp1rJZe h23qZDpt2YjjnsMtj07dMF1RnAzaDsrVtKwBGGV0SLjupOFp3IrJyZk87rRWY0WLZa4D0r+ kHZ1slkjwiGDBiMok2QXQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:4o+jiCSYr0w=:OODEC/Z+mRhFj7wzbhoTt0 r4jwU+GZxbto+QrVhffFwXAffkfu/vCDvIyekTNaWZT03IXCTfq9KLhyRj3uKu1Yte9viUru9 BeeYxcSwPYO3cWH7YPnM/bcGmEUgT3Du4vYax8I9/1gf9tf2ewzU3iJAmdwtzQuN2hYEVfJnN Wzr1zGQWXwnZ4pz6khtVqUpyssE/jnCiBbj02dtroy8+S2Kh2BHwSdLkclevUIqQwG/EunwWQ g3mdWPgNKHogOBvtqi9V5nJUKZIPGLRw9d2dvhSTQtIIvk1RAJIQQ65/wsBNos0JtZhATOBGW yRaUMLolpfaYM94HALL/VvJKcqbw6UUzHOno3oRDO5tGZFrQJIZkWs423PCW7ygITv2v1vKxx IvZ3foMXja3zbr/Kwihfe2c0fwHVhgtwrc9SyMHEY4sZxf4VAqm2sYCuOFChVP4I4TxgQhkKz X0pcJ8SC3c4Wa+EsuIZm580CPwLNi37WGsvlQTsY5H6+Fx+bfz+BB7n6352fWmyRqHCDPhu8o UvVzSweW8+nak5UP6tiRsub727/CaS/o9MlOSWdi5VeRUnTYDjpK4WCfIzXOHs+fF2ouB4PpR /C4NyKjRoDsJsdeft4i8pDgRYQiAslZg8/yhFSl4lNo9xqfZ5Kj9AOFF+Ia5QKOYKNFY49dvr aqIzjcXTOGEym1q+LKVrxMDk/eoyxUZ4o7etdYwPhl305pPUnJXS00DFy6UQTvcw8DQc060tM czQcqWhtJcN+IPIAMNXm4heFh35Iyda29YcgDgJVLeN1MQixCu3WTGxUlJV3pscLTLKvkfrKg zxB/HKW Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 813 Lines: 27 From: Markus Elfring Date: Thu, 13 Oct 2016 13:31:17 +0200 Replace the specification of a data type by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer. Signed-off-by: Markus Elfring --- drivers/media/rc/redrat3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 5832e6f..f6c21a1 100644 --- a/drivers/media/rc/redrat3.c +++ b/drivers/media/rc/redrat3.c @@ -388,7 +388,7 @@ static int redrat3_send_cmd(int cmd, struct redrat3_dev *rr3) u8 *data; int res; - data = kzalloc(sizeof(u8), GFP_KERNEL); + data = kzalloc(sizeof(*data), GFP_KERNEL); if (!data) return -ENOMEM; -- 2.10.1