summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-12-04 15:28:47 +0000
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2020-01-15 17:31:44 +0100
commitbc5e36f3d2cef45331aed822e2c4608634df256b (patch)
treef9314a3704099074f2d8f9aa647b3bc595657b52 /drivers/video/fbdev
parent52733e95f040944531b6e29544c8494f8a302ff1 (diff)
OMAP: DSS2: remove non-zero check on variable r
Variable r is being initialized to zero, so the check of a non-zero rv is redundant and can be removed. It appears that the previous case statements set r to be -EINVAL and the "Fallthrough" comment afterwards suggested it was going to fall through to this non-zero check but won't because of the break statement. Remove the confusion by removing the Fallthrough comment too. Addresses-Coverity: ("Logically dead code") Fixes: b39a982ddecf ("OMAP: DSS2: omapfb driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191204152847.1435188-1-colin.king@canonical.com
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/omap2/omapfb/omapfb-main.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
index 8dfa9158ba78..836e7b1639ce 100644
--- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
@@ -1154,16 +1154,12 @@ static int _setcolreg(struct fb_info *fbi, u_int regno, u_int red, u_int green,
r = fbdev->ctrl->setcolreg(regno, red, green, blue,
transp, update_hw_pal);
*/
- /* Fallthrough */
r = -EINVAL;
break;
case OMAPFB_COLOR_RGB565:
case OMAPFB_COLOR_RGB444:
case OMAPFB_COLOR_RGB24P:
case OMAPFB_COLOR_RGB24U:
- if (r != 0)
- break;
-
if (regno < 16) {
u32 pal;
pal = ((red >> (16 - var->red.length)) <<