提交 6f6abd36 编写于 作者: R Robert Jarzmik 提交者: Tomi Valkeinen

video: fbdev: pxafb: fix out of memory error path

As seen by Julia, the initial allocation memory is not checked anymore
after commit "video: fbdev: pxafb: initial devicetree conversion".
Introduce back the removed test.
Reported-by: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 caf05780
......@@ -2249,6 +2249,8 @@ static int pxafb_probe(struct platform_device *dev)
ret = -ENOMEM;
pdata = dev_get_platdata(&dev->dev);
inf = devm_kmalloc(&dev->dev, sizeof(*inf), GFP_KERNEL);
if (!inf)
goto failed;
if (pdata) {
*inf = *pdata;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册