lkml.org 
[lkml]   [2017]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] usb: gadget: f_uac*: fix noderef.cocci warnings
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;
\
 
 \ /
  Last update: 2017-07-02 19:28    [W:0.057 / U:0.932 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site