Skip to contentSkip to conversation

Moved assignment out of if() statement in efifb.c

PATCH In review Parmeshwr Prasad 1 participant 1 message Feb 18, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 Moved assignment out of if() statement in efifb.c

This patch depend on my earlier patchs.

Moving assignment out of if() statement.

---
 drivers/video/fbdev/efifb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/video/fbdev/efifb.c +4 -2
index cc1a156..9124ba9 100644
@@ -275,11 +275,13 @@ static int efifb_probe(struct platform_device *dev)
        info->fix = efifb_fix;
        info->flags = FBINFO_FLAG_DEFAULT | FBINFO_MISC_FIRMWARE;
 
-       if ((err = fb_alloc_cmap(&info->cmap, 256, 0)) < 0) {
+       err = fb_alloc_cmap(&info->cmap, 256, 0);
+       if (err < 0) {
                pr_err("efifb: cannot allocate colormap\n");
                goto err_unmap;
        }
-       if ((err = register_framebuffer(info)) < 0) {
+       err = register_framebuffer(info);
+       if (err < 0) {
                pr_err("efifb: cannot register framebuffer\n");
                goto err_fb_dealoc;
        }

--
1.9.3

-Parmeshwr