summaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
authorLuiz Sampaio <sampaio.ime@gmail.com>2021-05-19 19:30:41 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-21 14:51:32 +0200
commitddb20bcf77382c92389a5b506e5f52e840dc70a4 (patch)
tree996baed1f8f42e551da5fad8957931817547ccf8 /drivers/w1
parentc6fa1a96db26b22cdfb2055d8b1a79e8c40b1040 (diff)
downloadlinux-stable-ddb20bcf77382c92389a5b506e5f52e840dc70a4.tar.gz
linux-stable-ddb20bcf77382c92389a5b506e5f52e840dc70a4.tar.bz2
linux-stable-ddb20bcf77382c92389a5b506e5f52e840dc70a4.zip
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@gmail.com> Link: https://lore.kernel.org/r/20210519223046.13798-2-sampaio.ime@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/slaves/w1_ds2438.c10
1 files 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;
}