Received: by 10.223.176.46 with SMTP id f43csp876786wra; Wed, 24 Jan 2018 07:16:40 -0800 (PST) X-Google-Smtp-Source: AH8x224TWacey3cD6mykeuHBSc5EHc0tuomnpTZVgwI+uH27GGkLwS/9JUGXVMUTvheKF0U0B1/8 X-Received: by 2002:a17:902:b68b:: with SMTP id c11-v6mr8370317pls.95.1516807000132; Wed, 24 Jan 2018 07:16:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516807000; cv=none; d=google.com; s=arc-20160816; b=UJoLc11lebcf5PjEgJ98h4yMYwFo4Ird9mtPaowy57i2ck2bnV+vAwyNwYKdvbsacq FrqkyiJNNt0RN0W5JDTvLO56UdKEsOvSyp8kB+bF7qdYBUndY7AaPfIOzfYzfoB/MOSC 39Jevm+zCDrlksS8J0EmrWL24WQTyBI0v+cbUFZEJw0zPW69GdsVLZ3FRzkimbwcdwif kDezVKRpuwCiFk20XU/vDgLdQH3Ay3b/OQ4jkSZQiOMzuVwJ8txdIImV0Ni3jNMLLtwj W6IORwf013Fjbi633j5PuqBVVokiKgwpRsxnv6XYXO+5HTZCXwRybceuZ4LP8ukjQfvp GK6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=hcbJgTRC7bU1ywHdglzWrHo7zx3MA7qSG4MJgiTPf54=; b=kTHAO4KthhHLgsLFtoBynVrA2xvO4OsgI8wWsd5cRB0QKQMkqlGzHIcey+u1TkWkJ8 UGSKGSVVcPFR0c9SdFb/moCqKt1ePd0f1FgsLpgtbIkQNn4QDqMkB7cCxsclaRwnhHiQ ni4Fn5cd/HK6QCq1BFg0E4R4o7ENggRSr/oYNATFsqZvt8FpE2OHNDG685WAx0NnMKiK 7V8wZpFh3YhpI49TDURGf/nAtgcF8Qj57uOgMhwts1tjfgWbgkwERZy/2sOqcRzGXmcy O8jKMgy9/Qo791nSAK2K/9PKPHzjd6lCvv0+sbFcJINr54paTcFVD1rwzq1Q8wa+1r0R h5eg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e26si251406pgv.413.2018.01.24.07.16.25; Wed, 24 Jan 2018 07:16:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934143AbeAXPQF (ORCPT + 99 others); Wed, 24 Jan 2018 10:16:05 -0500 Received: from mout.web.de ([212.227.15.4]:54899 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933948AbeAXPQD (ORCPT ); Wed, 24 Jan 2018 10:16:03 -0500 Received: from [192.168.1.2] ([77.181.242.198]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MevzF-1ePKty3pqD-00OaSF; Wed, 24 Jan 2018 16:16:00 +0100 Subject: [PATCH 2/2] Input: gtco: Improve a size determination in gtco_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, Andrey Konovalov , Dmitry Torokhov Cc: LKML , kernel-janitors@vger.kernel.org References: <5c4410ab-5174-ce8d-cab6-7979aa61f996@users.sourceforge.net> Message-ID: <0c363cc1-5532-e482-82bf-c8b59c2bd72f@users.sourceforge.net> Date: Wed, 24 Jan 2018 16:15:59 +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: <5c4410ab-5174-ce8d-cab6-7979aa61f996@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:uO1cnTQKdNE2trGgXzbf/9aZQbBUx5te6DQzDkkots3J0Lte8qo 9lvQY8o23op+Z7jCth7Z5VmLwCtcJh+7LXh2lLMl8Dn2lLxJIi0XUD6THQdsWvYJx7Cv7nY GwtlkxlKhYlH+rOsASVRCduD1hyLpK97HiPxsWwt7dFMU9TluRYa8xAmDyMPDUEhr7ULJPL r40qUef3xZiAqMxi3W8MA== X-UI-Out-Filterresults: notjunk:1;V01:K0:iZkk2ayazCE=:OfIb9jbSgeju5PP97EKpdk ITajvTCtDuadH64U4UsO+HOmrsgNARKFYNbG+ABSGiuN481yZ46lcC2OyvY3+efYi44cPt7sf /GzAm6s39kLLS/gzoAS+f7JNdKlL8k8JViV+KoPgTRF9bmgEUjYNFKylVnYB6OrsbUdl/lJl8 AA4Ihf+tD/wI65BtQctFPRnFJtVd+J84vK60vKT6wDM9RRhkB7yad67Xl4NtT//mOhlVEy3U0 /ch7q2N93qzaYaYt0XBADzepR3K8sgE7yYXbMb+JQgVUrYsZSXm4sJQvtLbetf84WjZ4YDG0y KuYLdEBJRLL+xD6kdPlBGgHA4MEWh31xoN9laFvR0pyU/WvpSC37niC3cMmwB5MwAiN65PoU0 faAzl6/yDwn2htFXCX3WwfApJhoQMuD8ZmS3zCwElcLtajAIPG/J4EnStX9WPOf/EzU0SrN9q T6T21iJyzp2PB2RughzEr6gh58U1AdCxttea0N2KpevWpSGXvz4613iSZSZWaWGN91lffdaeB DZR9j5vJmbvhDJSufNjzpFdcO2CLfLpZSrnWEfCDeIzan+A8V4EF43F74A4pM7xf3Q8Qdawk/ HTuPg50k2Ey58ZQL/QoBEDQYFiIdKB0rOTvBoyyZaefkuqrS0moPKpeFwmU2Gfi2oz3PQK8F3 Saj0oLcM7gIRl30aZRIPl6e3+rB6Mgp0KpRNquAqh2jHQcbBvJWLJf4GSRXtrdbw2+lZLLh/i bZXICfiWrKzE9isq176J6nUk/60IPS0/svbW8Qh+jp4NyRyzKEtXuAHIGi971KhTPVpgwdiIt OqKP8nTH6TZ+Hc8ilPOB3faBrzfVrHbMxtRD/IksWJVKU9sUcg= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Wed, 24 Jan 2018 15:08:42 +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/input/tablet/gtco.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index f2670872735f..6094241d4aa1 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c @@ -829,7 +829,7 @@ static int gtco_probe(struct usb_interface *usbinterface, struct usb_device *udev = interface_to_usbdev(usbinterface); /* Allocate memory for device structure */ - gtco = kzalloc(sizeof(struct gtco), GFP_KERNEL); + gtco = kzalloc(sizeof(*gtco), GFP_KERNEL); input_dev = input_allocate_device(); if (!gtco || !input_dev) { dev_err(&usbinterface->dev, "No more memory\n"); -- 2.16.1