From: Felipe Balbi Date: Tue, 29 Mar 2016 09:27:14 +0000 (+0300) Subject: usb: phy: qcom: use PTR_ERR_OR_ZERO() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=acd877f4ec69639c825725091eb3749d36fd11b3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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,