Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3bbb3f0 authored by Jesper Juhl's avatar Jesper Juhl Committed by Linus Torvalds
Browse files

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: default avatarJesper Juhl <jesper.juhl@gmail.com>
Cc: Thomas Hellstrom <thomas@tungstengraphics.com>
Cc: Alan Hourihane <alanh@tungstengraphics.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent eb0645a8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;