Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754732AbeAGVaS (ORCPT + 1 other); Sun, 7 Jan 2018 16:30:18 -0500 Received: from mout.web.de ([212.227.15.4]:61428 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750965AbeAGVaQ (ORCPT ); Sun, 7 Jan 2018 16:30:16 -0500 Subject: [PATCH 2/2] misc/fsa9480: Improve a size determination in fsa9480_probe() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman Cc: LKML References: Message-ID: <4f62f094-3b5c-7c13-8b9f-1d2da9b1baf4@users.sourceforge.net> Date: Sun, 7 Jan 2018 22:30:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:mqLoKj9o/1fC8wQmVYM4GunggvCgFROm4JRfm4pWxFKFQEGuSoP INLQBgE8X3EaWZWooFoqq/mxJdxp4b3YTNJEzB8Hwo0qJaN11oqeZSoENBkCH2MDa+U+wS5 GAgQ9EqeLDY0KWia3kmrEDuDi9+IGPGMUPELZ2Y5Z8iC8sALUuJ5r+c63AVxuQrFY9o1imF wAs1ufDvMz1+BlhWcQuog== X-UI-Out-Filterresults: notjunk:1;V01:K0:T79EgDUDf6c=:sEnHHJTrxf+m80H5bHpIci rjlRmcgV37MW2cznqM9H/ZQnQi7MDp8dxcvqfJel6wntp7xahelRGY/LBOzcr4/GDCWKbrdnL FMLCQkxEdvIPB2S+/qcgoqJ64B7dzrC9+Obt3qkiEN11sXwlM+pfr4foYhthY1iC3ZdjIErjH dOpDcTdMWTMUwUziDfWcB66rS5cO4U9FiLSDOHybaBdLygteDuhANsh9NtRhkHi4C3mHNDHr7 U2EN3wPNvAqzgD4Ketp3+0M0Jx7DTAAZ/HrPSsfCher4EfGEhhrw9zTzw7UXCz1bl4RURw79d d53w63imaqIwrM4wQkMlsidVdepYyU4c0ww0jScMOh1rFCwasfcvXCnbTKZx2x4SIAGQ0IKu9 P/gb6d5yueWJKrUj5T6++rWTMni5gdA8cw6p9rvjgyEVG2k0qUa2ymuhnxmgQIBEBHCO0u+8m njm8iXfnVNfDRBE/mS/CRSJFStNSZr+IlU7hrNLcU2hmmn9+J8FbUgQyl6XNLvdcGSMYv+KAD YWV9PKyC+mVf1cMslpDAjcVkH/MaNfQDOGfxAwSJqCdLbFNBkr/QLAiSiF8aNaERFAk1y0m1W YicyO0AFaKRr7CNiElD5EN0D/5G7S5Vu+PVhYYq+BWBc2d+UKJqZc6pICHGVGCSuBA6rHh0IG pl20vT+lJcMiQiN673Sc5wq1GyD5JgjEttZZ+fTKnsI7QV/CLNcTi1QSggp3Bt88O44ZM7AIi CMzI9Nc1GPw0re+8Y3/+0rurWYKx6/XH5IfK7M4N4fUrg9gmV/Dzq2gRGzn0UZxEmKwdfgboq uCOHxO3wPSkuPQXlAHRuezr2pyE7MHRKjymXSLV39Jl6ALv5Xw= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Sun, 7 Jan 2018 22:20:19 +0100 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/misc/fsa9480.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/fsa9480.c b/drivers/misc/fsa9480.c index 4d7f763195bc..bf199cd5fce9 100644 --- a/drivers/misc/fsa9480.c +++ b/drivers/misc/fsa9480.c @@ -417,7 +417,7 @@ static int fsa9480_probe(struct i2c_client *client, if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) return -EIO; - usbsw = kzalloc(sizeof(struct fsa9480_usbsw), GFP_KERNEL); + usbsw = kzalloc(sizeof(*usbsw), GFP_KERNEL); if (!usbsw) return -ENOMEM; -- 2.15.1