Skip to content

Commit

Permalink
cr_backlight_probe() allocates too little storage for struct cr_panel
Browse files Browse the repository at this point in the history
The Coverity checker noticed that we allocate too little storage for
"struct cr_panel *crp" in cr_backlight_probe().

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Cc: Thomas Hellstrom <thomas@tungstengraphics.com>
Cc: Alan Hourihane <alanh@tungstengraphics.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jesper Juhl authored and Linus Torvalds committed Jul 20, 2007
1 parent eb0645a commit e3bbb3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/backlight/cr_bllcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e3bbb3f

Please sign in to comment.