diff mbox

phy: sun9i-usb: fix error handling

Message ID 1467784806-17091-1-git-send-email-christophe.jaillet@wanadoo.fr (mailing list archive)
State New, archived
Headers show

Commit Message

Christophe JAILLET July 6, 2016, 6 a.m. UTC
This is likely that checking 'phy->hsic_clk' instead of 'phy->clk' is
expected here.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

---

v2: Also fix the variable name used by PTR_ERR
    Update $subject
---
 drivers/phy/phy-sun9i-usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Chen-Yu Tsai July 6, 2016, 6:06 a.m. UTC | #1
On Wed, Jul 6, 2016 at 2:00 PM, Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
> This is likely that checking 'phy->hsic_clk' instead of 'phy->clk' is
> expected here.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Acked-by: Chen-Yu Tsai <wens@csie.org>
Kishon Vijay Abraham I Aug. 12, 2016, 8:41 a.m. UTC | #2
On Wednesday 06 July 2016 11:36 AM, Chen-Yu Tsai wrote:
> On Wed, Jul 6, 2016 at 2:00 PM, Christophe JAILLET
> <christophe.jaillet@wanadoo.fr> wrote:
>> This is likely that checking 'phy->hsic_clk' instead of 'phy->clk' is
>> expected here.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> Acked-by: Chen-Yu Tsai <wens@csie.org>

merged, thanks

-Kishon
diff mbox

Patch

diff --git a/drivers/phy/phy-sun9i-usb.c b/drivers/phy/phy-sun9i-usb.c
index ac4f31a..28fce4b 100644
--- a/drivers/phy/phy-sun9i-usb.c
+++ b/drivers/phy/phy-sun9i-usb.c
@@ -141,9 +141,9 @@  static int sun9i_usb_phy_probe(struct platform_device *pdev)
 		}
 
 		phy->hsic_clk = devm_clk_get(dev, "hsic_12M");
-		if (IS_ERR(phy->clk)) {
+		if (IS_ERR(phy->hsic_clk)) {
 			dev_err(dev, "failed to get hsic_12M clock\n");
-			return PTR_ERR(phy->clk);
+			return PTR_ERR(phy->hsic_clk);
 		}
 
 		phy->reset = devm_reset_control_get(dev, "hsic");