From mboxrd@z Thu Jan 1 00:00:00 1970 From: kbuild test robot Subject: [PATCH] USB: serial: cp210x: fix noderef.cocci warnings Date: Thu, 14 Jan 2016 01:57:16 +0800 Message-ID: <20160113175716.GA8557@lkp-nex05> References: <201601140128.israexFi%fengguang.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga01.intel.com ([192.55.52.88]:29562 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755005AbcAMR7G (ORCPT ); Wed, 13 Jan 2016 12:59:06 -0500 Content-Disposition: inline In-Reply-To: <1452688237-30385-1-git-send-email-martyn.welch@collabora.co.uk> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org Cc: kbuild-all@01.org, Johan Hovold , Linus Walleij , Alexandre Courbot , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org, Martyn Welch drivers/usb/serial/cp210x.c:1132:15-21: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci CC: Martyn Welch Signed-off-by: Fengguang Wu --- cp210x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@ -1129,7 +1129,7 @@ static int cp210x_shared_gpio_init(struc if ((tmp & CP210X_FEATURE_HAS_SHARED_GPIO) == 0) return 0; - buf = kzalloc(sizeof(buf), GFP_KERNEL); + buf = kzalloc(sizeof(*buf), GFP_KERNEL); if (!buf) return -ENOMEM;