From patchwork Sun Sep 3 20:36:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9936581 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 707226038C for ; Sun, 3 Sep 2017 20:36:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64ADA28419 for ; Sun, 3 Sep 2017 20:36:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59AC62863D; Sun, 3 Sep 2017 20:36:39 +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=unavailable 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 04A2B28419 for ; Sun, 3 Sep 2017 20:36:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752833AbdICUg2 (ORCPT ); Sun, 3 Sep 2017 16:36:28 -0400 Received: from mout.web.de ([212.227.15.14]:52604 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752133AbdICUg0 (ORCPT ); Sun, 3 Sep 2017 16:36:26 -0400 Received: from [192.168.1.2] ([78.48.243.242]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M1lTm-1dVQok27qc-00tiPN; Sun, 03 Sep 2017 22:36:16 +0200 Subject: [PATCH 6/7] [media] Hexium Orion: Improve a size determination in hexium_probe() From: SF Markus Elfring To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , Sakari Ailus Cc: LKML , kernel-janitors@vger.kernel.org References: <170abf7f-3b62-a37c-966a-8b574acae230@users.sourceforge.net> Message-ID: Date: Sun, 3 Sep 2017 22:36:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <170abf7f-3b62-a37c-966a-8b574acae230@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:UmV+7u0hLFfx+rvU0Rusq1X/Xab/qJnHzVCGscEgv35yfSSxcpn PSga3RglrsF4+PU5kwMQ9EVGZcycVNahvj9KuWVjGwKkPtNdUiiD3hJaSMK7FIf8tld5NGd exSfF6yHyFNkCUkl+A39Fv4IuSsluW/4XZAuE9+Fe8fYvDK7BwcoDUkiDsGnkYjlfhZdnh7 LTsLnB3THt2EBT1gjPUUA== X-UI-Out-Filterresults: notjunk:1; V01:K0:q3Nz2UP0jGA=:Yer9CGha9C86icu/xVaoWj YQXo+e287fAD3fp4pY1zV4LrrAfTTOA9p/9/M4+rk/pdmEZKrJ9NGsYic108TqJfsf3gCkXvw bibwC3yB++ldXb/0r8Bfzq+ZVbn3KQQzG7Jhy8xozqhtN8C2AOZxdS4L/UxgEreyZVH4I7qaf SXA5X2IreST1gNI6dyk6s9N3xeZ3KWGvKz4feS6EweQydrLUyDVKPJhyN5vjDeMzwFDIAsX8N C0USiByumJ6KvcShIbu1ldZulLRnc5xDysgHMbuT65QwDVD7TNVY9EHsA33xuRnjumKBGrB7I AMzGgsDTI1kfSeVweJppF+aPf7sFPX+UYAGLcLbhe/Vnv7+eA3Xxh5VfFRJaTKy17wzQPebSi g8ozzBZNWI6pXkkDmL3cNYf1Wvk4IhYevYxZLVcqfNa9O/+UDpXzbGaBP7ZW6NTlOZU2gyEPP Dq38ilZrtgrs9uuoxttX8GaMgh9TTBY0DH4aezCBeXuhxc4SoWZDDf9n0zn9tdFLMer5bMw3W 0GyH09202EHPODJv72onk7zY9SSrFUBY2Gtr6Rov4jr5/FsJhepMoDFuavc55HpU84/hCBF9c +sLTJ4aESQJTbJB6CjOJ72YSgLfxmcdXhdrrHv0tyZyMK5CAI1iENZn8rXO4iPpIHC3Onngt9 TmiY3Pa86xpvmxCLsoCEfyu32ms89MGnb4YPoTOalOBkzla07F/SIR81hIoofIMLNyGF+UUcC 93XT9ls0AAy2LUG7frIr6r47ZtAlQZUTJgjBVFOAMye8Lzx53ojMnFIfLkb4rKEA2UuXTXLT4 xcTQA7Wmbudarwgi7uGSf2dy3F1jsNtCn7B7I9d1NSdRnx2JeE= 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: Sun, 3 Sep 2017 20:00:17 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/media/pci/saa7146/hexium_orion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/saa7146/hexium_orion.c b/drivers/media/pci/saa7146/hexium_orion.c index 72fac6a8494a..187e072a3697 100644 --- a/drivers/media/pci/saa7146/hexium_orion.c +++ b/drivers/media/pci/saa7146/hexium_orion.c @@ -219,5 +219,5 @@ static int hexium_probe(struct saa7146_dev *dev) return -EFAULT; } - hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); + hexium = kzalloc(sizeof(*hexium), GFP_KERNEL); if (!hexium)