[PATCH v2] USB: ohci-s3c2410: return proper error if clk_get fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Return PTR_ERR(clk) instead of -ENOENT if clk_get fails

Signed-off-by: Jingoo Han <jg1.han@xxxxxxxxxxx>
---
v2: fix wrong clock name

 drivers/usb/host/ohci-s3c2410.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c
index 5837d21..e15199a 100644
--- a/drivers/usb/host/ohci-s3c2410.c
+++ b/drivers/usb/host/ohci-s3c2410.c
@@ -364,14 +364,14 @@ static int usb_hcd_s3c2410_probe (const struct hc_driver *driver,
 	clk = clk_get(&dev->dev, "usb-host");
 	if (IS_ERR(clk)) {
 		dev_err(&dev->dev, "cannot get usb-host clock\n");
-		retval = -ENOENT;
+		retval = PTR_ERR(clk);
 		goto err_mem;
 	}
 
 	usb_clk = clk_get(&dev->dev, "usb-bus-host");
 	if (IS_ERR(usb_clk)) {
 		dev_err(&dev->dev, "cannot get usb-bus-host clock\n");
-		retval = -ENOENT;
+		retval = PTR_ERR(usb_clk);
 		goto err_clk;
 	}
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux