Skip to content

Commit

Permalink
video:uvesafb: check the return value of kzalloc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wang YanQing authored and Florian Tobias Schandinat committed Aug 23, 2012
1 parent bada553 commit 7ed2586
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/video/uvesafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 7ed2586

Please sign in to comment.