summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@linux.intel.com>2016-03-29 12:27:14 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-04-14 09:24:38 +0300
commitacd877f4ec69639c825725091eb3749d36fd11b3 (patch)
tree00b51569439be6e9fe5ad7ed5d9b3eebd2374866 /drivers
parent46cdd1900fa7a1d7afd1f8d051e513105d0cea98 (diff)
downloadtalos-obmc-linux-acd877f4ec69639c825725091eb3749d36fd11b3.tar.gz
talos-obmc-linux-acd877f4ec69639c825725091eb3749d36fd11b3.zip
usb: phy: qcom: use PTR_ERR_OR_ZERO()
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/phy/phy-qcom-8x16-usb.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/phy/phy-qcom-8x16-usb.c b/drivers/usb/phy/phy-qcom-8x16-usb.c
index 3d7af85aecb9..d8593adb3621 100644
--- a/drivers/usb/phy/phy-qcom-8x16-usb.c
+++ b/drivers/usb/phy/phy-qcom-8x16-usb.c
@@ -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,
OpenPOWER on IntegriCloud