Skip to content

Commit

Permalink
usb: phy: rcar-usb: remove duplicate check on resource
Browse files Browse the repository at this point in the history
Sanity check on resource happening with devm_ioremap_resource().

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Varka Bhadram authored and Felipe Balbi committed Nov 3, 2014
1 parent 687f16b commit 28a2694
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/usb/phy/phy-rcar-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,9 @@ static int rcar_usb_phy_probe(struct platform_device *pdev)
return PTR_ERR(reg0);

res1 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
if (res1) {
reg1 = devm_ioremap_resource(dev, res1);
if (IS_ERR(reg1))
return PTR_ERR(reg1);
}
reg1 = devm_ioremap_resource(dev, res1);
if (IS_ERR(reg1))
return PTR_ERR(reg1);

priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
Expand Down

0 comments on commit 28a2694

Please sign in to comment.