fbdev: propagate result of fb_videomode_from_videomode()
authorVladimir Murzin <vladimir.murzin@arm.com>
Fri, 12 Jun 2015 13:59:19 +0000 (14:59 +0100)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 16 Jun 2015 07:06:36 +0000 (10:06 +0300)
fb_videomode_from_videomode() may fail, but of_get_fb_videomode()
silently covers this fact. Instead, trow the error code to the
caller.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/core/fbmon.c

index 01ef1b953390d186a02770e08f3cb954f8d22a72..d787533d9c8b0b0e589fe4eaa217b29debbb6845 100644 (file)
@@ -1475,7 +1475,9 @@ int of_get_fb_videomode(struct device_node *np, struct fb_videomode *fb,
        if (ret)
                return ret;
 
-       fb_videomode_from_videomode(&vm, fb);
+       ret = fb_videomode_from_videomode(&vm, fb);
+       if (ret)
+               return ret;
 
        pr_debug("%s: got %dx%d display mode from %s\n",
                of_node_full_name(np), vm.hactive, vm.vactive, np->name);