Skip to contentSkip to conversation

video: fbdev: use if else instead

PATCH New Qing Wang 1 participant 1 message Mar 29, 2022 Framebuffer layer

lore
Share & tools
lore

Qing Wang

author
#0 lore raw

PATCH 1/1 video: fbdev: use if else instead

From: Wang Qing <[email protected]>

use if and else instead of consequent if(A) and if (!A)

---
 drivers/video/fbdev/pxafb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 drivers/video/fbdev/pxafb.c
drivers/video/fbdev/pxafb.c +2 -2
index f1551e0..8ad91c2
@@ -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;
 
Signature · 1 line
2.7.4