From e3bbb3f05339de438faf54124f25c92e6fe4ac2e Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Fri, 20 Jul 2007 00:31:47 -0700 Subject: [PATCH] cr_backlight_probe() allocates too little storage for struct cr_panel The Coverity checker noticed that we allocate too little storage for "struct cr_panel *crp" in cr_backlight_probe(). Signed-off-by: Jesper Juhl Cc: Thomas Hellstrom Cc: Alan Hourihane Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/backlight/cr_bllcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/cr_bllcd.c b/drivers/video/backlight/cr_bllcd.c index e9bbc3455c94..1b3f6586bc9f 100644 --- a/drivers/video/backlight/cr_bllcd.c +++ b/drivers/video/backlight/cr_bllcd.c @@ -174,7 +174,7 @@ static int cr_backlight_probe(struct platform_device *pdev) struct cr_panel *crp; u8 dev_en; - crp = kzalloc(sizeof(crp), GFP_KERNEL); + crp = kzalloc(sizeof(*crp), GFP_KERNEL); if (crp == NULL) return -ENOMEM; -- 2.30.2