phy: phy-rcar-usb: remove duplicate check on resource
authorVarka Bhadram <varkabhadram@gmail.com>
Tue, 4 Nov 2014 02:21:30 +0000 (07:51 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Nov 2014 17:01:51 +0000 (09:01 -0800)
Sanity check on resource happening with devm_ioremap_resource().

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/phy/phy-rcar-usb.c

index 33265a5b2cdf8fdca0fc6ba0b7752a6a54ae9c4f..e9f3a93e42b7227db67192f87ec65ae2d7ad151c 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) {