video: fbdev: pxafb: use if else instead
authorWang Qing <wangqing@vivo.com>
Tue, 29 Mar 2022 09:14:32 +0000 (02:14 -0700)
committerHelge Deller <deller@gmx.de>
Mon, 4 Apr 2022 06:55:23 +0000 (08:55 +0200)
use if and else instead of consequent if(A) and if (!A)

Signed-off-by: Wang Qing <wangqing@vivo.com>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/pxafb.c

index f1551e0..8ad91c2 100644 (file)
@@ -2256,10 +2256,10 @@ static int pxafb_probe(struct platform_device *dev)
                        goto failed;
                for (i = 0; i < inf->num_modes; i++)
                        inf->modes[i] = pdata->modes[i];
+       } else {
+               inf = of_pxafb_of_mach_info(&dev->dev);
        }
 
-       if (!pdata)
-               inf = of_pxafb_of_mach_info(&dev->dev);
        if (IS_ERR_OR_NULL(inf))
                goto failed;