Messages in this thread Patch in this message | | | Date | Wed, 16 Sep 2020 14:55:01 +0800 | From | kernel test robot <> | Subject | [PATCH] USB: PHY: JZ4770: fix ptr_ret.cocci warnings |
| |
From: kernel test robot <lkp@intel.com>
drivers/phy/ingenic/phy-ingenic-usb.c:348:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
CC: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com> Signed-off-by: kernel test robot <lkp@intel.com> ---
url: https://github.com/0day-ci/linux/commits/Zhou-Yanjie/Use-the-generic-PHY-framework-for-Ingenic-USB-PHY/20200913-143611 base: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next
phy-ingenic-usb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/phy/ingenic/phy-ingenic-usb.c +++ b/drivers/phy/ingenic/phy-ingenic-usb.c @@ -345,10 +345,7 @@ static int ingenic_usb_phy_probe(struct phy_set_drvdata(priv->phy, priv); provider = devm_of_phy_provider_register(priv->dev, of_phy_simple_xlate); - if (IS_ERR(provider)) - return PTR_ERR(provider); - - return 0; + return PTR_ERR_OR_ZERO(provider); } static const struct of_device_id ingenic_usb_phy_of_matches[] = {
| |