Commit 4658e1db authored by Leonid Kushnir's avatar Leonid Kushnir Committed by Mauro Carvalho Chehab

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@linuxSigned-off-by: default avatarLeonid Kushnir <leonf008@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 3a7c578f
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment