diff options
| author | Andrew Goodbody <[email protected]> | 2025-08-07 11:04:03 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-08-15 14:17:30 -0600 |
| commit | 4a2f360bd280b2b5af1c5daffbc189590c83c995 (patch) | |
| tree | 900293041ce044d407057428feb1b8bb8fb00371 | |
| parent | 64204ab107b51c60e490292ed1eda40a9a64d7d9 (diff) | |
pinctrl: stmfx: Remove duplicated code
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 <[email protected]>
| -rw-r--r-- | drivers/pinctrl/pinctrl-stmfx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c index 61f335c4eb1..0d5778faef9 100644 --- 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, |
