lkml.org 
[lkml]   [2020]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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[] = {
\
 
 \ /
  Last update: 2020-09-16 08:57    [W:0.109 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site