git: 53a64a093824 - stable/14 - rk_pinctrl: fix error check
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Jun 2024 17:56:44 UTC
The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=53a64a0938241869b7dc657c5bf30e3bde1879c2 commit 53a64a0938241869b7dc657c5bf30e3bde1879c2 Author: John F. Carr <jfc@mit.edu> AuthorDate: 2024-06-14 16:37:06 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2024-06-27 17:56:23 +0000 rk_pinctrl: fix error check The parse_bias method returns a signed int, with a value of -1 when the device tree reports nothing of the bias configuration. Convert the local 'bias' from unsigned to signed to properly check this condition. PR: 229721 Reviewed by: mhorne MFC after: 3 days (cherry picked from commit 97ab935d566c85458bc7cab99c402f026d704eff) --- sys/arm64/rockchip/rk_pinctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/rockchip/rk_pinctrl.c b/sys/arm64/rockchip/rk_pinctrl.c index 7a47e3b9d468..02017258dbe2 100644 --- a/sys/arm64/rockchip/rk_pinctrl.c +++ b/sys/arm64/rockchip/rk_pinctrl.c @@ -1142,9 +1142,9 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, uint32_t *pindata) { phandle_t pin_conf; struct syscon *syscon; - uint32_t bank, subbank, pin, function, bias; + uint32_t bank, subbank, pin, function; uint32_t bit, mask, reg, drive; - int i, rv; + int i, rv, bias; bank = pindata[0]; pin = pindata[1];