mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-22 18:01:29 +01:00
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:
parent
64204ab107
commit
4a2f360bd2
@ -87,7 +87,7 @@ static int stmfx_read_reg(struct udevice *dev, u8 reg_base, uint offset)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return ret < 0 ? ret : !!(ret & mask);
|
return !!(ret & mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int stmfx_write_reg(struct udevice *dev, u8 reg_base, uint offset,
|
static int stmfx_write_reg(struct udevice *dev, u8 reg_base, uint offset,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user