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 <andrew.goodbody@linaro.org>
This commit is contained in:
Andrew Goodbody
2025-08-15 14:17:30 -06:00
committed by Tom Rini
parent 64204ab107
commit 4a2f360bd2
+1 -1
View File
@@ -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,