提交 7ed25867 编写于 作者: W Wang YanQing 提交者: Florian Tobias Schandinat

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: NWang YanQing <udknight@gmail.com>
Signed-off-by: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
上级 bada5537
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册