| From stable-bounces@linux.kernel.org Fri Jul 20 00:33:13 2007 |
| From: akpm@linux-foundation.org |
| Date: Fri, 20 Jul 2007 00:31:47 -0700 |
| Subject: cr_backlight_probe() allocates too little storage for struct cr_panel |
| To: torvalds@linux-foundation.org |
| Cc: thomas@tungstengraphics.com, akpm@linux-foundation.org, jesper.juhl@gmail.com, alanh@tungstengraphics.com, stable@kernel.org |
| Message-ID: <200707200731.l6K7VlJj013766@imap1.linux-foundation.org> |
| |
| |
| From: Jesper Juhl <jesper.juhl@gmail.com> |
| |
| 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> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
| |
| --- |
| drivers/video/backlight/cr_bllcd.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/drivers/video/backlight/cr_bllcd.c |
| +++ b/drivers/video/backlight/cr_bllcd.c |
| @@ -174,7 +174,7 @@ static int cr_backlight_probe(struct pla |
| struct cr_panel *crp; |
| u8 dev_en; |
| |
| - crp = kzalloc(sizeof(crp), GFP_KERNEL); |
| + crp = kzalloc(sizeof(*crp), GFP_KERNEL); |
| if (crp == NULL) |
| return -ENOMEM; |
| |