提交 40dc23aa 编写于 作者: A Alan Cox 提交者: Jiri Kosina

tmiofb: missing NULL pointer checks

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44471
Reported-by: <rucsoftsec@gmail.com>
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 3fd44cd4
......@@ -694,6 +694,10 @@ static int __devinit tmiofb_probe(struct platform_device *dev)
dev_err(&dev->dev, "NULL platform data!\n");
return -EINVAL;
}
if (ccr == NULL || lcr == NULL || vram == NULL || irq < 0) {
dev_err(&dev->dev, "missing resources\n");
return -EINVAL;
}
info = framebuffer_alloc(sizeof(struct tmiofb_par), &dev->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册