summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonid Kushnir <leonf008@gmail.com>2020-10-06 11:17:21 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-22 19:40:38 +0300
commit4658e1dbc358b754fac3268aa903d268e41b35df (patch)
tree8e0dce24399786704a3df9e46f5731ffc1eaad4e
parent3a7c578f391839d60d32d08a31af04e6cc489564 (diff)
downloadlinux-4658e1dbc358b754fac3268aa903d268e41b35df.tar.xz
media: staging: atomisp: Removed else branch in function
This patch fixes the checkpatch.pl warning : WARNING: else is not generally useful after a break or return Expressions under 'else' branch in function 'gc0310_s_power' are executed whenever the exppression in 'if' is False. Otherwise, return from function occurs. Therefore, there is no need in 'else', and it has been removed. Link: https://lore.kernel.org/linux-media/20201006081721.GA35979@linux Signed-off-by: Leonid Kushnir <leonf008@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/staging/media/atomisp/i2c/atomisp-gc0310.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
index 6be3ee1d93a5..8201c15b5769 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
@@ -874,11 +874,10 @@ static int gc0310_s_power(struct v4l2_subdev *sd, int on)
if (on == 0)
return power_down(sd);
- else {
- ret = power_up(sd);
- if (!ret)
- return gc0310_init(sd);
- }
+ ret = power_up(sd);
+ if (!ret)
+ return gc0310_init(sd);
+
return ret;
}