projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
477fc03
)
video:uvesafb: Fix dereference NULL pointer code path
author
Wang YanQing
<udknight@gmail.com>
Sat, 30 Mar 2013 02:53:00 +0000
(
04:53
+0200)
committer
Tomi Valkeinen
<tomi.valkeinen@ti.com>
Tue, 2 Apr 2013 10:33:55 +0000
(13:33 +0300)
platform_device_alloc could failed and return NULL,
we should check this before call platform_device_put.
Signed-off-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/uvesafb.c
patch
|
blob
|
history
diff --git
a/drivers/video/uvesafb.c
b/drivers/video/uvesafb.c
index
b75db01
..
d428445
100644
(file)
--- a/
drivers/video/uvesafb.c
+++ b/
drivers/video/uvesafb.c
@@
-1973,7
+1973,8
@@
static int uvesafb_init(void)
err = -ENOMEM;
if (err) {
- platform_device_put(uvesafb_device);
+ if (uvesafb_device)
+ platform_device_put(uvesafb_device);
platform_driver_unregister(&uvesafb_driver);
cn_del_callback(&uvesafb_cn_id);
return err;