From: Aishwarya Ramakrishnan Subject: [PATCH] phy: tegra: Use PTR_ERR_OR_ZERO() to simplify code Date: Tue, 5 May 2020 20:30:49 +0530 Message-ID: <20200505150058.17674-1-aishwaryarj100@gmail.com> Return-path: Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Kishon Vijay Abraham I , Thierry Reding , Jonathan Hunter , Aishwarya Ramakrishnan , Lorenzo Pieralisi , Vidya Sagar , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-tegra@vger.kernel.org PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Aishwarya Ramakrishnan --- drivers/phy/tegra/phy-tegra194-p2u.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/phy/tegra/phy-tegra194-p2u.c b/drivers/phy/tegra/phy-tegra194-p2u.c index 7042bed9feaa..42394d27f4cb 100644 --- a/drivers/phy/tegra/phy-tegra194-p2u.c +++ b/drivers/phy/tegra/phy-tegra194-p2u.c @@ -92,10 +92,7 @@ static int tegra_p2u_probe(struct platform_device *pdev) phy_set_drvdata(generic_phy, phy); phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); - if (IS_ERR(phy_provider)) - return PTR_ERR(phy_provider); - - return 0; + return PTR_ERR_OR_ZERO(phy_provider); } static const struct of_device_id tegra_p2u_id_table[] = { -- 2.17.1