diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2007-07-20 03:31:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-20 11:44:20 -0400 |
commit | e3bbb3f05339de438faf54124f25c92e6fe4ac2e (patch) | |
tree | ac71f22e810909df9f069c9d5638ed102da0565d /drivers/video/backlight/cr_bllcd.c | |
parent | eb0645a8b1f14da300f40bb9f424640cd1181fbf (diff) |
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>
Diffstat (limited to 'drivers/video/backlight/cr_bllcd.c')
-rw-r--r-- | drivers/video/backlight/cr_bllcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
174 | struct cr_panel *crp; | 174 | struct cr_panel *crp; |
175 | u8 dev_en; | 175 | u8 dev_en; |
176 | 176 | ||
177 | crp = kzalloc(sizeof(crp), GFP_KERNEL); | 177 | crp = kzalloc(sizeof(*crp), GFP_KERNEL); |
178 | if (crp == NULL) | 178 | if (crp == NULL) |
179 | return -ENOMEM; | 179 | return -ENOMEM; |
180 | 180 | ||