Commit 6f6abd36 authored by Robert Jarzmik's avatar Robert Jarzmik Committed by 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: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent caf05780
...@@ -2249,6 +2249,8 @@ static int pxafb_probe(struct platform_device *dev) ...@@ -2249,6 +2249,8 @@ static int pxafb_probe(struct platform_device *dev)
ret = -ENOMEM; ret = -ENOMEM;
pdata = dev_get_platdata(&dev->dev); pdata = dev_get_platdata(&dev->dev);
inf = devm_kmalloc(&dev->dev, sizeof(*inf), GFP_KERNEL); inf = devm_kmalloc(&dev->dev, sizeof(*inf), GFP_KERNEL);
if (!inf)
goto failed;
if (pdata) { if (pdata) {
*inf = *pdata; *inf = *pdata;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment