]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
cmd: Fix control bmp_display()
authorSimon Glass <sjg@chromium.org>
Sat, 30 Jan 2016 22:45:15 +0000 (15:45 -0700)
committerAnatolij Gustschin <agust@denx.de>
Sat, 6 Feb 2016 12:53:09 +0000 (13:53 +0100)
All paths should share the same return.

Reported-by: Coverity (CID:134903)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
cmd/bmp.c

index fd5b7db28852a7dcf225b066744e4591658dcb28..01b3d39e9c8ec99f253b3fe05e1e37f3da7a1470 100644 (file)
--- a/cmd/bmp.c
+++ b/cmd/bmp.c
@@ -259,7 +259,6 @@ int bmp_display(ulong addr, int x, int y)
                        ret = video_bmp_display(dev, addr, x, y, align);
                }
        }
-       return ret ? CMD_RET_FAILURE : 0;
 #elif defined(CONFIG_LCD)
        ret = lcd_display_bitmap(addr, x, y);
 #elif defined(CONFIG_VIDEO)
@@ -271,5 +270,5 @@ int bmp_display(ulong addr, int x, int y)
        if (bmp_alloc_addr)
                free(bmp_alloc_addr);
 
-       return ret;
+       return ret ? CMD_RET_FAILURE : 0;
 }