[PATCH] phy: keystone-usb: Do not negate return code

Andrew Goodbody andrew.goodbody at linaro.org
Wed Aug 6 17:47:46 CEST 2025


In keystone_usb_init the return code from psc_enable_module should be
returned as is rather than being negated.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
---
 drivers/phy/keystone-usb-phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/keystone-usb-phy.c b/drivers/phy/keystone-usb-phy.c
index cfc15203d63..460efbe768d 100644
--- a/drivers/phy/keystone-usb-phy.c
+++ b/drivers/phy/keystone-usb-phy.c
@@ -41,7 +41,7 @@ static int keystone_usb_init(struct phy *phy)
 	rc = psc_enable_module(keystone->psc_domain);
 	if (rc) {
 		debug("Cannot enable USB module");
-		return -rc;
+		return rc;
 	}
 	mdelay(10);
 

---
base-commit: 007610da2cca405ea7739fc120d90085be4b6ac2
change-id: 20250806-keystone-usb-phy-8338bf3a1895

Best regards,
-- 
Andrew Goodbody <andrew.goodbody at linaro.org>



More information about the U-Boot mailing list