Skip to content

Commit

Permalink
usb: phy: rcar-gen2-usb: always use 'dev' variable in probe() method
Browse files Browse the repository at this point in the history
The probe() method has the 'dev' local variable declared and used but strangely
not in all cases where it should be...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Sergei Shtylyov authored and Felipe Balbi committed Mar 5, 2014
1 parent eee3f15 commit 7241a21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/phy/phy-rcar-gen2-usb.c
Original file line number Diff line number Diff line change
@@ -177,15 +177,15 @@ static int rcar_gen2_usb_phy_probe(struct platform_device *pdev)
struct clk *clk;
int retval;

pdata = dev_get_platdata(&pdev->dev);
pdata = dev_get_platdata(dev);
if (!pdata) {
dev_err(dev, "No platform data\n");
return -EINVAL;
}

clk = devm_clk_get(&pdev->dev, "usbhs");
clk = devm_clk_get(dev, "usbhs");
if (IS_ERR(clk)) {
dev_err(&pdev->dev, "Can't get the clock\n");
dev_err(dev, "Can't get the clock\n");
return PTR_ERR(clk);
}

0 comments on commit 7241a21

Please sign in to comment.