From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752843AbdIBUqS (ORCPT ); Sat, 2 Sep 2017 16:46:18 -0400 Received: from mout.web.de ([212.227.17.12]:57287 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751192AbdIBUqQ (ORCPT ); Sat, 2 Sep 2017 16:46:16 -0400 Subject: [PATCH 6/7] [media] Mantis: Improve a size determination in mantis_pci_probe() From: SF Markus Elfring To: linux-media@vger.kernel.org, Mauro Carvalho Chehab Cc: LKML , kernel-janitors@vger.kernel.org References: <9ba22d42-0ec0-b865-dec5-4ce67ad443fb@users.sourceforge.net> Message-ID: Date: Sat, 2 Sep 2017 22:46:11 +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: <9ba22d42-0ec0-b865-dec5-4ce67ad443fb@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:3phugO+3MnlDNGMpMmTPA1RaQQFdy0My6fSF8af0YXdY5BhBsa4 fzcqoPBW44l3s149Rs6ZSAH2v8fUcQLTI1xEp+JyFQ/0fykAPhKVUFT6x6tYsO6h+y2CLet aDRj9zYao3YdfEx0G8ISRdbk9U/DW+1ARIgltjsoNCnHSzO8vqNeapuMzlUlDG1Iv/BS/yb qDF/WX8KF0jPdIs5s/UWA== X-UI-Out-Filterresults: notjunk:1;V01:K0:dGyOCT1h/XQ=:jelDZKy5vb1ILTy61DQ6mi tigmmxGFYHUrGnLcAXUt7ULfvI7IbbSYpU1Z1BBaEg2IrMyTN3MWYvEPU7dYmxbwQEHmqtpjQ lSmZqFMRazs20PYCoU/cFOH2h8+xeejmctqsDyx4xfPwD6jNsohWv+Nvug+I98bqEX1xXF7dP 00pZUfDtuF+2RYBp7djVjTcz71zuSHYS5OU2BJtUwAQ2mHWc3PZXwczujl7MgC6dFCJaOqglN VyJE37wXKls174ecTboZdWYox6VuE0n83AH4nyOQN7+ibnIQpdPhG9Ojq/Yf5umOt1DQI+BIp sLim5p/G7E7LM1MMOq5cSNQvyq1Q/t/YI7FN5J1KuF7JVFAfkNu+MRcO4XS6dlO7lEmEmwkK7 aHobmrZtpvJwK2v7XB1MdIbK8rdcH8HZwRkjj+gSLomxaBYTdmnv3lxiDcTKLkN3Fux3KEjn7 9Rzl4aEKcvx651WD1szfv3kDSHEUuzX9rP9NZH8ilprmCEuHthBqzVPU87BHEz35u3UhC0JZH xJMXwrrOxaASyfHplJE1TOJ/cNPdQyldmXrYVAcYQ9X2y885j3SMs8qUK67jrvQvCmsOiIKWx UahErJKHwqcKt/hP6W+nK0C60h4pDpY0fR1qpqLflngrF8IDDctjrPVBMPv0WEfyHwxuGxvK1 YkVGx94nXK283odTS6VzfHll1u8rA5EQT0E0u2U8t6W+Zr/C8dnUDkDaRugJ8iQIiXI4kfTSo zTU1pfdWkoLM004GKOrBbE00I+SYqRs4Ll17ykj8OVsKqyEKqnSpSujQ8sQEg8rWKMeWGUSdc ZzhGLyxpnRzNs/MGbFz5wUM5BRe+iucrkyUtIZGopGB5jUbP70= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Sat, 2 Sep 2017 21:56:07 +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/mantis/mantis_cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/mantis/mantis_cards.c b/drivers/media/pci/mantis/mantis_cards.c index 56a01f6f84c7..6182ae44dd23 100644 --- a/drivers/media/pci/mantis/mantis_cards.c +++ b/drivers/media/pci/mantis/mantis_cards.c @@ -173,5 +173,5 @@ static int mantis_pci_probe(struct pci_dev *pdev, struct mantis_hwconfig *config; int err = 0; - mantis = kzalloc(sizeof(struct mantis_pci), GFP_KERNEL); + mantis = kzalloc(sizeof(*mantis), GFP_KERNEL); if (!mantis) -- 2.14.1