From patchwork Thu Oct 13 16:29:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9375409 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7B8FD6075E for ; Thu, 13 Oct 2016 16:33:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B9C62A16A for ; Thu, 13 Oct 2016 16:33:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FB042A16C; Thu, 13 Oct 2016 16:33:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19B652A16A for ; Thu, 13 Oct 2016 16:33:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757191AbcJMQch (ORCPT ); Thu, 13 Oct 2016 12:32:37 -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 Received: from [192.168.1.2] ([77.182.72.22]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0Lc8n7-1bBAzD32mL-00jdlJ; Thu, 13 Oct 2016 18:29:42 +0200 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> 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-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;