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>
This commit is contained in:
Wang YanQing 2012-08-13 18:02:32 +08:00 коммит произвёл Florian Tobias Schandinat
Родитель bada55371f
Коммит 7ed2586747
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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);