[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210403044821.390485-1-sampaio.ime@gmail.com>
Date: Sat, 3 Apr 2021 01:48:13 -0300
From: Luiz Sampaio <sampaio.ime@...il.com>
To: zbr@...emap.net
Cc: corbet@....net, rikard.falkeborn@...il.com,
gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
Luiz Sampaio <sampaio.ime@...il.com>
Subject: [PATCH v3 1/9] w1: ds2438: fixed a coding style issue
There is an if statement and, if the function goes into it, it returns.
So, the next else is not required.
Signed-off-by: Luiz Sampaio <sampaio.ime@...il.com>
---
drivers/w1/slaves/w1_ds2438.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/w1/slaves/w1_ds2438.c b/drivers/w1/slaves/w1_ds2438.c
index 5cfb0ae23e91..148921fb9702 100644
--- a/drivers/w1/slaves/w1_ds2438.c
+++ b/drivers/w1/slaves/w1_ds2438.c
@@ -154,11 +154,11 @@ static int w1_ds2438_change_config_bit(struct w1_slave *sl, u8 mask, u8 value)
if ((status & mask) == value)
return 0; /* already set as requested */
- else {
- /* changing bit */
- status ^= mask;
- perform_write = 1;
- }
+
+ /* changing bit */
+ status ^= mask;
+ perform_write = 1;
+
break;
}
--
2.30.1
Powered by blists - more mailing lists