[PATCH] usb: dwc3: of-simple: fix noderef.cocci warnings

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

 



drivers/usb/dwc3/dwc3-of-simple.c:53:43-49: 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: Vivek Gautam <vivek.gautam@xxxxxxxxxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---

 dwc3-of-simple.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/dwc3/dwc3-of-simple.c
+++ b/drivers/usb/dwc3/dwc3-of-simple.c
@@ -50,7 +50,7 @@ static int dwc3_of_simple_reset_init(str
 
 	simple->num_resets = count;
 
-	simple->resets = devm_kcalloc(dev, count, sizeof(simple->resets),
+	simple->resets = devm_kcalloc(dev, count, sizeof(*simple->resets),
 							GFP_KERNEL);
 	if (!simple->resets)
 		return -ENOMEM;
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux