From 80a7f727b0b0a1a3c530e39c0c059914e1a7199c Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Tue, 29 Jul 2014 12:16:43 -0300 Subject: [PATCH] [media] drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c: use correct structure type name in sizeof Correct typo in the name of the type given to sizeof. Because it is the size of a pointer that is wanted, the typo has no impact on compilation or execution. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). The semantic patch used can be found in message 0 of this patch series. [Replace sizeof(type) by sizeof(variable)]] Signed-off-by: Julia Lawall Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c index 01df0683e950..69b678ca40c0 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c @@ -227,7 +227,7 @@ static int vpfe_enable_clock(struct vpfe_device *vpfe_dev) return 0; vpfe_dev->clks = kcalloc(vpfe_cfg->num_clocks, - sizeof(struct clock *), GFP_KERNEL); + sizeof(*vpfe_dev->clks), GFP_KERNEL); if (vpfe_dev->clks == NULL) return -ENOMEM; -- 2.34.1