usb: phy: keystone: remove redundant return value check of platform_get_resource()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 24 Dec 2013 11:37:27 +0000 (19:37 +0800)
committerFelipe Balbi <balbi@ti.com>
Thu, 26 Dec 2013 16:19:01 +0000 (10:19 -0600)
Remove unneeded error handling on the result of a call
to platform_get_resource() when the value is passed to
devm_ioremap_resource().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-keystone.c

index ee1d03b802e145507c9add86b8cccc61fe7cae69..d762003896c06bd9302bd2311fb39444b9ea420d 100644 (file)
@@ -83,11 +83,6 @@ static int keystone_usbphy_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(dev, "missing usb phy resource\n");
-               return -EINVAL;
-       }
-
        k_phy->phy_ctrl = devm_ioremap_resource(dev, res);
        if (IS_ERR(k_phy->phy_ctrl))
                return PTR_ERR(k_phy->phy_ctrl);