diff mbox

fix noderef.cocci warnings

Message ID 20151204181448.GA38784@lkp-sb04 (mailing list archive)
State New, archived
Headers show

Commit Message

kernel test robot Dec. 4, 2015, 6:14 p.m. UTC
drivers/misc/gpio-switch.c:98:34-40: 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 <martyn.welch@collabora.co.uk>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

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

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/drivers/misc/gpio-switch.c
+++ b/drivers/misc/gpio-switch.c
@@ -95,7 +95,7 @@  static int gpio_switch_probe(struct plat
 	if (i < 1)
 		return i;
 
-	gpios = devm_kmalloc(&pdev->dev, sizeof(gpios) * i, GFP_KERNEL);
+	gpios = devm_kmalloc(&pdev->dev, sizeof(*gpios) * i, GFP_KERNEL);
 	if (!gpios)
 		return -ENOMEM;