lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170525195827.14811-3-u.kleine-koenig@pengutronix.de>
Date:   Thu, 25 May 2017 21:58:27 +0200
From:   Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
To:     Kishon Vijay Abraham I <kishon@...com>
Cc:     linux-kernel@...r.kernel.org, kernel@...gutronix.de
Subject: [PATCH 3/3] phy: twl4030-usb: propagate actual error on regulator lookup

devm_regulator_get returns an error code, return this one to the caller
instead of -ENODEV. This fixes deferred probe.

Fixes: 6747caa76cab ("usb: phy: twl4030: use the new generic PHY framework")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
---
 drivers/phy/phy-twl4030-usb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
index 6aefbd55fcee..422232aac0b2 100644
--- a/drivers/phy/phy-twl4030-usb.c
+++ b/drivers/phy/phy-twl4030-usb.c
@@ -499,7 +499,7 @@ static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
 
 	twl->usb3v1 = devm_regulator_get(twl->dev, "usb3v1");
 	if (IS_ERR(twl->usb3v1))
-		return -ENODEV;
+		return PTR_ERR(twl->usb3v1);
 
 	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB3V1_TYPE);
 
@@ -508,7 +508,7 @@ static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
 
 	twl->usb1v5 = devm_regulator_get(twl->dev, "usb1v5");
 	if (IS_ERR(twl->usb1v5))
-		return -ENODEV;
+		return PTR_ERR(twl->usb1v5);
 
 	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB1V5_TYPE);
 
@@ -517,7 +517,7 @@ static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
 
 	twl->usb1v8 = devm_regulator_get(twl->dev, "usb1v8");
 	if (IS_ERR(twl->usb1v8))
-		return -ENODEV;
+		return PTR_ERR(twl->usb1v8);
 
 	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB1V8_TYPE);
 
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ