projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6fa1a9
)
w1: ds2438: fixed a coding style issue
author
Luiz Sampaio
<sampaio.ime@gmail.com>
Wed, 19 May 2021 22:30:41 +0000
(19:30 -0300)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 21 May 2021 12:51:32 +0000
(14:51 +0200)
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>
drivers/w1/slaves/w1_ds2438.c
patch
|
blob
|
history
diff --git
a/drivers/w1/slaves/w1_ds2438.c
b/drivers/w1/slaves/w1_ds2438.c
index 5cfb0ae23e916c78e1f34bc4754b42071134cf1f..148921fb97022fff70244dbdfeb3524a704aebe0 100644
(file)
--- 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;
}