]> git.baikalelectronics.ru Git - kernel.git/commit
OMAP: DSS2: remove non-zero check on variable r
authorColin Ian King <colin.king@canonical.com>
Wed, 4 Dec 2019 15:28:47 +0000 (15:28 +0000)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Wed, 15 Jan 2020 16:31:44 +0000 (17:31 +0100)
commit7470f9503ffa155adfc3dea59e4fc95803d769e5
treef9314a3704099074f2d8f9aa647b3bc595657b52
parent2c273bb7442bc166da0399b5891ddda029e7c533
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: 3ccb23ef2e8e ("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
drivers/video/fbdev/omap2/omapfb/omapfb-main.c