Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965787AbeAJPdp (ORCPT + 1 other); Wed, 10 Jan 2018 10:33:45 -0500 Received: from mout.web.de ([217.72.192.78]:59686 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934011AbeAJPde (ORCPT ); Wed, 10 Jan 2018 10:33:34 -0500 Subject: [PATCH 2/3] misc/ti-st: Improve a size determination in kim_probe() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Arnd Bergmann , Arvind Yadav , "David S. Miller" , Greg Kroah-Hartman , Johannes Berg , Stephen Hemminger Cc: LKML References: Message-ID: <5df1dcbb-2c86-f333-0b1f-4ad3b86a3278@users.sourceforge.net> Date: Wed, 10 Jan 2018 16:33:23 +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:Js543C40SDvph8R9DMJ+ahvycMaDy3IfJsICXYDAZB9F9mN/68h jrh0zLzie16HkanwwJiQ5yez7eNZzHpFlxsnMMBhJcfkBK8rBo642zfnhIktKEgDA3vumgG mt2utIkcjWbprleK9YchJiuW2TYPkVTR1Z05k8rwWdT3DV3kr+d6Mwdg+G5VrFvcXVH4LRm 5wh2sXqzWZECUeDHBqGwg== X-UI-Out-Filterresults: notjunk:1;V01:K0:rwe4lV+VORs=:+ZkTzJnP/IVhUV5Od0sGBq NiTpOuPR4zHTgkacKYXOVRgL86nuf5fLXz4pWKreRTRONZ2H9SsspOhdW2jSUs3uTiiRkgOb/ g20yE+UqYzKEX+3QcomhTEPTgwL934c498HXjzKu8I3wroBMTXFVkJLfAHM2meaq3iwBKMusx qb1pYICCIkhFRBonAwaHgnwrdSgI7EBAHH0otIjq7BykCvP9J83kq+g84vfptb8R8rn0K9vqx ZmnL2Tk4bQgl+ixkaIaBhJvvSoBNRgEmkf++JapB9GKyA8shb/RQkDmEW/hvu9VdePRdryH+f AHtw25JIasI5tQ9v76CClYAKYdEv0LaqqtWquFoXvdY9TQkeNXPF5gLDhPRFx2EwuRUcIdAuf 9RuwSDrUhax8/f3NucFIgKup8xqDEcVrnzsAxapZV7nbPKcTRVyblW/1ZyRCMby0eCo78nuWj AIRGTTWwNpZ4FJnQw7VbTgK2NDoMhlNxAQ+6K079loI0rLdYi7YkoEMUtUZ1RCUB/D1G4bFZS VF1A+9wSt2Dgz7OP8lEH9HSQwHNKwN598ftcEI1hNNqnBE41N9GY9LLo9g+OZ8Ypo83X1wZg6 SLjQR8ugAasOayPYLMESvUBFG8dWsx7AuAREnu98Nb6k3Te8C9YUoUVMoreDQnQqfJkVyXV29 5MoC3sb/6gklvyDV/QdDqIGQNNIJPZukXA2vfvHLmGQpyJlTdBPZAZGfRK9gnlLQ4LXx1SvRB vVH8QcvlYaZ077UmOn6FjXK69J5wsy1ShoqFdo3znlebqo4AS87Bdma/C9DSpP17z6QjO/N6x wHxJOcbGDgfoz7egB55JipMmCxXw/mN/aVn0bbflLWg26d3e6A= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Wed, 10 Jan 2018 16:10:45 +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/ti-st/st_kim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 68ebdf466b17..948e3461d02e 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c @@ -735,7 +735,7 @@ static int kim_probe(struct platform_device *pdev) st_kim_devices[0] = pdev; } - kim_gdata = kzalloc(sizeof(struct kim_data_s), GFP_ATOMIC); + kim_gdata = kzalloc(sizeof(*kim_gdata), GFP_ATOMIC); if (!kim_gdata) return -ENOMEM; -- 2.15.1