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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---

 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux