From: Simon Glass Date: Sat, 30 Jan 2016 22:45:15 +0000 (-0700) Subject: cmd: Fix control bmp_display() X-Git-Tag: v2016.03-rc2~92^2~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e517db73a61376b940a9b352eb717f703f6b25df;p=u-boot cmd: Fix control bmp_display() All paths should share the same return. Reported-by: Coverity (CID:134903) Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- diff --git a/cmd/bmp.c b/cmd/bmp.c index fd5b7db288..01b3d39e9c 100644 --- 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; }