video: fbdev: pxafb: use if else instead

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>
This commit is contained in:
Wang Qing 2022-03-29 02:14:32 -07:00 committed by Helge Deller
parent aaf7dbe073
commit b23e868d35

View 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;