git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64204ab
)
pinctrl: stmfx: Remove duplicated code
author
Andrew Goodbody
<andrew.goodbody@linaro.org>
Thu, 7 Aug 2025 10:04:03 +0000
(11:04 +0100)
committer
Tom Rini
<trini@konsulko.com>
Fri, 15 Aug 2025 20:17:30 +0000
(14:17 -0600)
In stmfx_read_reg there is duplicated code to detect ret < 0 and return
ret if so. Remove one version of it.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
drivers/pinctrl/pinctrl-stmfx.c
patch
|
blob
|
history
diff --git
a/drivers/pinctrl/pinctrl-stmfx.c
b/drivers/pinctrl/pinctrl-stmfx.c
index
61f335c
..
0d5778f
100644
(file)
--- a/
drivers/pinctrl/pinctrl-stmfx.c
+++ b/
drivers/pinctrl/pinctrl-stmfx.c
@@
-87,7
+87,7
@@
static int stmfx_read_reg(struct udevice *dev, u8 reg_base, uint offset)
if (ret < 0)
return ret;
- return
ret < 0 ? ret :
!!(ret & mask);
+ return !!(ret & mask);
}
static int stmfx_write_reg(struct udevice *dev, u8 reg_base, uint offset,