From: Jesper Juhl Date: Fri, 20 Jul 2007 07:31:47 +0000 (-0700) Subject: cr_backlight_probe() allocates too little storage for struct cr_panel X-Git-Tag: v2.6.23-rc1~223 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=e3bbb3f05339de438faf54124f25c92e6fe4ac2e;p=linux.git 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 --- 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;