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: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
        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;