Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968064AbeAOOCL (ORCPT + 1 other); Mon, 15 Jan 2018 09:02:11 -0500 Received: from mout.web.de ([212.227.15.14]:58625 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964837AbeAOOCI (ORCPT ); Mon, 15 Jan 2018 09:02:08 -0500 Subject: [PATCH 2/2] mfd/rc5t583: Improve a size determination in rc5t583_i2c_probe() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML References: <681cd296-5d05-cdf8-f031-162d7f837b36@users.sourceforge.net> Message-ID: <144ca5ca-1cfd-28a7-7bf3-8f513d567abc@users.sourceforge.net> Date: Mon, 15 Jan 2018 15:02:05 +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: <681cd296-5d05-cdf8-f031-162d7f837b36@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:E33pTSX3/iHiOgJWSeWdhUJVRYqNNWQpidOjT9/5Drw1zaB6QHy 1B/L8MNY+O3ZmGI7+YXwf3dkRVJR25AXz0VEpUyKlJGng5xXkUB3c7URyCn4Zr/nPOaToR9 RbFR7FijS5iTMEMk6IZeDiiyd1siI+Ky1X+lBCXpJ8RWXAHNOHrFMo2jb0J3U3JiE0Omrpe JcSS7kGK8BNuwR0P62tlw== X-UI-Out-Filterresults: notjunk:1;V01:K0:iyhVlpe3Sog=:1uW9pJ3fCHK9ED+R1QJ0Pr ctWf56ichwxfQHNxin+pvMrz3Xwiwnta2uNIbXdsVwn5Cof5WQpqWPNY/X8LsiE0hdd/qxVqk kyyEHoG/spFbQYiuyrHgg6il78NNZHTEXNfLSdI6r2tRpl2ZD6ev8ZfZt4DlMkC7kGa7NQzfV 41buMQQLNtBiT0KRx6KM7LWNYouryRfjC4As/Kp0KnK6UyBLpwriZfwJ0vCbV4P7yRLM76kGd KpNrzIiF1DxIydOLQF/koOB3mG3pPd4Wrs1HQ/k+uIuvicOUFCG8JXl8G8sSF+SbUMcGgosZF 6wkBOT1LiR55+/u02aNVsXk5/LMjjZzxnl+OFLpKaIodykIU5hHnaKvRk/kQ4b47fvhGaElul OWxZGGkVvph0qMnO3lgj7pccYD27z3IYXUqGLLGAnKOlEX3QHhG9r9RlVJPgVQpd5kLYy0f3p ii49JSwrmIShnmcFH+9sKr4DnlIfyPEHPD+JGBtupZF9f8RrXYXnT/QpeMNcWXcNo9osmDgRg zGmtHFj3XCPnI6gcOywfjsNa0c1S85/8N3B37KKmT7tpXFXtmEPPEwVUI/SpXIqXP9sfMbjpG kv3z0+O5DmMcTCT9iWBnGIVGNmMeB/vC0HhtLfNi7pOVjFZeaOH9nEYJbwA9Qycgnoet8SXW9 ANkiYKZKSEtaUDkTe+MZqWaxEwfxaZzvneeOp6RdD+33K0CUPhBMgQoLQWmEHqk2i0p7tNFFe /sB80SeE+GrqkPyg2wQq5H9zKLEX0o1dLrP329VYHksqagRqm3lURkH0VT565MjzR63ngGk90 +3i2a3W2RRbAbDzfZa+6Xi8i/WLTc/YBNecZIJb6egnXj8lwgc= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Mon, 15 Jan 2018 14:50:25 +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/mfd/rc5t583.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/rc5t583.c b/drivers/mfd/rc5t583.c index 411dba636a53..fd46de02b715 100644 --- a/drivers/mfd/rc5t583.c +++ b/drivers/mfd/rc5t583.c @@ -258,7 +258,7 @@ static int rc5t583_i2c_probe(struct i2c_client *i2c, return -EINVAL; } - rc5t583 = devm_kzalloc(&i2c->dev, sizeof(struct rc5t583), GFP_KERNEL); + rc5t583 = devm_kzalloc(&i2c->dev, sizeof(*rc5t583), GFP_KERNEL); if (!rc5t583) return -ENOMEM; -- 2.15.1