usb: phy: rcar-usb: remove duplicate check on resource
authorVarka Bhadram <varkabhadram@gmail.com>
Wed, 29 Oct 2014 16:00:17 +0000 (21:30 +0530)
committerFelipe Balbi <balbi@ti.com>
Mon, 3 Nov 2014 16:01:21 +0000 (10:01 -0600)
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>
drivers/usb/phy/phy-rcar-usb.c

index 4879596..1e09b83 100644 (file)
@@ -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)