mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 02:34:01 +08:00
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 <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>
This commit is contained in:
parent
eb0645a8b1
commit
e3bbb3f053
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user