projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bada553
)
video:uvesafb: check the return value of kzalloc
author
Wang YanQing
<udknight@gmail.com>
Mon, 13 Aug 2012 10:02:32 +0000
(18:02 +0800)
committer
Florian Tobias Schandinat
<FlorianSchandinat@gmx.de>
Thu, 23 Aug 2012 13:18:08 +0000
(13:18 +0000)
Michal maybe forgot it merely, we should add code
to check the return value of kzalloc to make the
code more robust.
Signed-off-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/uvesafb.c
patch
|
blob
|
history
diff --git
a/drivers/video/uvesafb.c
b/drivers/video/uvesafb.c
index b0e2a4261afec5cd64f524f29807a3cbe70da2d8..2f8f82d874a15995b375a7250d5eb259711d9a69 100644
(file)
--- a/
drivers/video/uvesafb.c
+++ b/
drivers/video/uvesafb.c
@@
-659,6
+659,8
@@
static int __devinit uvesafb_vbe_getedid(struct uvesafb_ktask *task,
task->t.flags = TF_BUF_RET | TF_BUF_ESDI;
task->t.buf_len = EDID_LENGTH;
task->buf = kzalloc(EDID_LENGTH, GFP_KERNEL);
+ if (!task->buf)
+ return -ENOMEM;
err = uvesafb_exec(task);