Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp822476ybj; Tue, 5 May 2020 08:05:01 -0700 (PDT) X-Google-Smtp-Source: APiQypIb1PXf5NRY05iBcnjNVD6jkG22yaYPN6qgoUHCZnGZhaMxjQf0HSR5pByIMeZH+PtdnU+E X-Received: by 2002:a50:fa87:: with SMTP id w7mr3203699edr.0.1588691101369; Tue, 05 May 2020 08:05:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588691101; cv=none; d=google.com; s=arc-20160816; b=Tdw42wUXO9qKuSLfKjoYho/vn5+r5WR0ZY6iZP8ZbjqCJIqHSPxkgmxDHgW/+/vYGz Om6f+bCMCQ9ZugunHIY9DDp4G8fxlbwC+nhjBgzUKta2SKXtf7WHuwfrheKhi5IWYr4q 4zR1JR0YKr7j+Df+iGi2fpmQzGoux4hJS8sWfGIW12sVPKeC9UAjXIwPtS5A3mRgfDnc z0i3HIJ2eSNU3k/1Ei3Zk/MzoQ1EsqqYCKTVUld2VzYiXw5U2MmREcNj4PbE4A//Ub/l 18JKOMJx4PACnWa7ImXiUK1f/loSroj1Xh1FXOkI+kVmNRRWq6OI6RkGKx3UmONAryrF SyrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature; bh=9Wez+z5lCI0hS4teojmRNn9oUej07xsC5ZAyPPM7jFw=; b=iszRJc46pfTuLfAB184Ds8tMoZLw3FEcEqONT+eQIod6EAFZ58gAQUOCfQ18WMxZP8 ob3x9MHjAhBzBAs0EC8ZcjcK7oovMtlvVQRfUh2D94nuMlmuOVX3/O1f8Y0sr76urfDZ Or6VzI2gAl9NEa4cVu/Zrzf8JSBspyG8sfJUIlR5smDBknbe4+X1OP6lUeBYEFezibD1 iufVNVqS0ELWQJrjgeyiauwGgE06nuVSf2cC7aNFpCdPwQKPP++n2MFzd8vatfzbY/bD ZzoVifp24Bk5NpjuPQRvjPltPdekO7/LbqKqo7K0cP7STsIX9iWRTPeGY3l6pJf+FR0l sgwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aDXKeHOf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si1156884eja.251.2020.05.05.08.04.30; Tue, 05 May 2020 08:05:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aDXKeHOf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729686AbgEEPBP (ORCPT + 99 others); Tue, 5 May 2020 11:01:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729667AbgEEPBO (ORCPT ); Tue, 5 May 2020 11:01:14 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A881AC061A0F; Tue, 5 May 2020 08:01:14 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id mq3so1268056pjb.1; Tue, 05 May 2020 08:01:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=9Wez+z5lCI0hS4teojmRNn9oUej07xsC5ZAyPPM7jFw=; b=aDXKeHOfSlo2rCfHADtT4Q9TjUr+Ag9sUEzdm27UQPz6km3DVswbPcQsXkSIsXAG1c xPaPYTpqAyMbhth2rciiELDkH75JsEtyeeghzKUgkCNLQfOwKx3KbdoLvkHmyKvbgxT5 Z4HxlBVwDBZVYdr0H3oAQHO0pAi8XmtaAOiEZ6gkbXuME5vhTyOcztrsYp4U6sXEGhpj wePIwTVuQC1FH1o3hvYmX5K5+1NzMWeKZoNJfAdarz6s4T89efpih7e8JDO3tZJOkF5V S/M2dZhxvKQfHcprkmxMAe+b9zL3kH0cP9dMo64gZ3lckOTsRwAbQH8lp1b0zGUhqgtt VLNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=9Wez+z5lCI0hS4teojmRNn9oUej07xsC5ZAyPPM7jFw=; b=taYI+7agvqSuVEqgu2vLSPe/Yo3lxL8GvKHeWc5Mb8/35he8425Z5WHIpHtzgLL2kW HukkVjfl213dXZ3V5XbHYjuRkAAK7RRknYqfmf3Io3hkHJmKiNNHrWmtlCj/pKfkiZA6 Xkt22LXJTdOv0qnCfUm1LDZb/1W54wcA2xRb+y45nvuRMzaXvl1OGp8fysNzWYahy6p3 rC0paoEWQwEa1+yUW+POO6STWYpwFV8mqS55UHqNiSe2i01OaIK0LB3e9KATwO3lYSYn M0PPsyvzbAvbazgqZfeGw+Lu1Vx8KNF3pnioJpHLDfKHypC3Ndfp6NG7sL6yJw22exwQ HYdg== X-Gm-Message-State: AGi0PuYENiBPjXhm6Gc/f5v2QMNAxGMac4HV1I2NOcju9VXZZVHpeBP3 uyBXzsRAkxVBPnUHYC8U3mI= X-Received: by 2002:a17:90a:d56:: with SMTP id 22mr3425448pju.187.1588690874256; Tue, 05 May 2020 08:01:14 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:60b:fcd9:7c28:bcca:10e4:5523]) by smtp.gmail.com with ESMTPSA id t188sm2186681pfb.185.2020.05.05.08.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2020 08:01:13 -0700 (PDT) From: Aishwarya Ramakrishnan To: Kishon Vijay Abraham I , Thierry Reding , Jonathan Hunter , Aishwarya Ramakrishnan , Lorenzo Pieralisi , Vidya Sagar , linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org 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> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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