[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201006081721.GA35979@linux>
Date: Tue, 6 Oct 2020 10:17:21 +0200
From: Leonid Kushnir <leonf008@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: mchehab@...nel.org, sakari.ailus@...ux.intel.com,
gregkh@...uxfoundation.org, leonf008@...il.com,
linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] 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.
Signed-off-by: Leonid Kushnir <leonf008@...il.com>
---
drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 9 ++++-----
1 file 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;
}
--
2.25.1
Powered by blists - more mailing lists