Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1679510

[PATCH] usb: gadget: f_uac*: fix noderef.cocci warnings

From kbuild test robot <lkp@intel.com>
Newsgroups linux.kernel
Subject [PATCH] usb: gadget: f_uac*: fix noderef.cocci warnings
Date 2017-07-02 18:00 +0200
Message-ID <tYPrX-40F-7@gated-at.bofh.it> (permalink)
References <tYPrX-40F-9@gated-at.bofh.it> <tY2hA-4Qj-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


drivers/usb/gadget/legacy/audio.c:231:23-29: 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

Fixes: f95cee9b299f ("usb: gadget: f_uac*: Reduce code duplication")
CC: Julian Scheel <julian@jusst.de>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 audio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/gadget/legacy/audio.c
+++ b/drivers/usb/gadget/legacy/audio.c
@@ -228,7 +228,7 @@ static int audio_bind(struct usb_composi
 #endif
 
 #if !defined(CONFIG_GADGET_UAC1) || !defined(CONFIG_GADGET_UAC1_LEGACY)
-	memset(uac_opts, 0x0, sizeof(uac_opts));
+	memset(uac_opts, 0x0, sizeof(*uac_opts));
 	uac_opts->p_chmask = p_chmask;
 	uac_opts->p_srate[0] = p_srate;
 	uac_opts->p_srate_active = p_srate;

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv2 2/3] usb: gadget: f_uac*: Reduce code duplication Julian Scheel <julian@jusst.de> - 2017-06-30 13:30 +0200
  [PATCH] usb: gadget: f_uac*: fix noderef.cocci warnings kbuild test robot <lkp@intel.com> - 2017-07-02 18:00 +0200
  Re: [PATCHv2 2/3] usb: gadget: f_uac*: Reduce code duplication kbuild test robot <lkp@intel.com> - 2017-07-02 18:00 +0200

csiph-web