From: Leonid Kushnir Date: Tue, 6 Oct 2020 08:17:21 +0000 (+0200) Subject: media: staging: atomisp: Removed else branch in function X-Git-Tag: v5.13-rc1~124^2~226 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4658e1dbc358b754fac3268aa903d268e41b35df;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c index 6be3ee1d93a54..8201c15b57699 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; }