diff options
author | Wang YanQing <udknight@gmail.com> | 2012-08-13 06:02:32 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-08-23 09:18:08 -0400 |
commit | 7ed25867478fb8d2118eb84b99c1bf21e4ae695c (patch) | |
tree | 6a260ca55c6ea92e7ffbceca176b22cfb1d13f81 /drivers/video/uvesafb.c | |
parent | bada55371fb2b3615983ba231cad61ef21bdf9c3 (diff) |
video:uvesafb: check the return value of kzalloc
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>
Diffstat (limited to 'drivers/video/uvesafb.c')
-rw-r--r-- | drivers/video/uvesafb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index b0e2a4261afe..2f8f82d874a1 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c | |||
@@ -659,6 +659,8 @@ static int __devinit uvesafb_vbe_getedid(struct uvesafb_ktask *task, | |||
659 | task->t.flags = TF_BUF_RET | TF_BUF_ESDI; | 659 | task->t.flags = TF_BUF_RET | TF_BUF_ESDI; |
660 | task->t.buf_len = EDID_LENGTH; | 660 | task->t.buf_len = EDID_LENGTH; |
661 | task->buf = kzalloc(EDID_LENGTH, GFP_KERNEL); | 661 | task->buf = kzalloc(EDID_LENGTH, GFP_KERNEL); |
662 | if (!task->buf) | ||
663 | return -ENOMEM; | ||
662 | 664 | ||
663 | err = uvesafb_exec(task); | 665 | err = uvesafb_exec(task); |
664 | 666 | ||