]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
usb: phy: qcom: use PTR_ERR_OR_ZERO()
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 29 Mar 2016 09:27:14 +0000 (12:27 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 14 Apr 2016 06:24:38 +0000 (09:24 +0300)
coccicheck found this pattern which could be
converted to PTR_ERR_OR_ZERO(). No functional
changes.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/phy/phy-qcom-8x16-usb.c

index 3d7af85aecb9564d23946a98e7bb48dea81bf86f..d8593adb36215733c59bdc1e57739ee04083b75a 100644 (file)
@@ -240,10 +240,7 @@ static int phy_8x16_read_devicetree(struct phy_8x16 *qphy)
 
        qphy->switch_gpio = devm_gpiod_get_optional(dev, "switch",
                                                   GPIOD_OUT_LOW);
-       if (IS_ERR(qphy->switch_gpio))
-               return PTR_ERR(qphy->switch_gpio);
-
-       return 0;
+       return PTR_ERR_OR_ZERO(qphy->switch_gpio);
 }
 
 static int phy_8x16_reboot_notify(struct notifier_block *this,