Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp457019ybe; Thu, 5 Sep 2019 00:08:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBt3Jkzwnh6WwklXOoStHaeY0vE6QGul3qtwk1Ct4QcicriAAjdNQq3OyN3eyhf/kqP3SM X-Received: by 2002:a17:902:e592:: with SMTP id cl18mr1769424plb.291.1567667314039; Thu, 05 Sep 2019 00:08:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567667314; cv=none; d=google.com; s=arc-20160816; b=h51RqTbWOz+eG6X1sNwvkk0v30W4BiVpRkXlOYRk+wLW/BhyQY133S9ycQ6ABN4fc5 UVTyVBYyVg6tkkYLptZkxDjhnjSqc6r2hkLaNboQzk4dl6ppJAtquSgAonLIX9vQgqmx Tlxok8KXXDqG5vkOGHPdTv4QxpIOOxl3A5sLysSz3UaNTpA8v0IwYynat9eWxjgl8+iU 4RABXczqKYl81HF7avaipE7+RwgQyzxyHGFRfPsP7uwvEwkQZbrujgaf3CO3ym1FR6aj jUR6xcqed7/287rFTiymVpYMXK70n/lCWFfJpNieBNkc6N4B2FN9kGBynZWwrkeq0vFv ez4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=0C8VPNY1fdcQ5IFqu7CvMNLnLXzGqUkDnkmm/YWUEKI=; b=ZfOXwNo1Lv5Lvvlz2U/LtAeERY1vOrOXwTgZNBUBa6Vw9zOisfWbgBMvAOEwtSfZwX v9BVweFqsxi7NXixhIlP/e1EoNk4USbPsFCCxCqksdjEU8oIa7XBFBo4uJH69WY34iKO IHo3onr5YhMkwyYEkaayl5SOLoC2LF/BSCPe1ZJPCt2R6SeCa+2ygiNMpPE/bh01Lj85 7N8sHz8oLkvQGV7d/gydFG+HUn0HGGnmJp64BBRd++VMPXcorf5RhunHNE3pY+GZyE6v TbGoL7J8WZks2oguuXPJFKMjG1Th+xul6qrD+rQ0URDMty9jNE9JaK41Z/V19C3RGEo1 rg3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id br3si1292001pjb.6.2019.09.05.00.08.18; Thu, 05 Sep 2019 00:08:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731649AbfIEGqd (ORCPT + 99 others); Thu, 5 Sep 2019 02:46:33 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6679 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726097AbfIEGqY (ORCPT ); Thu, 5 Sep 2019 02:46:24 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 6D03CDB8DBB710AB9656; Thu, 5 Sep 2019 14:46:21 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Thu, 5 Sep 2019 14:46:13 +0800 From: zhong jiang To: , , , , , , , CC: , , , , Subject: [PATCH 3/4] phy: tegra: Use PTR_ERR_OR_ZERO rather than its implementation Date: Thu, 5 Sep 2019 14:43:14 +0800 Message-ID: <1567665795-5901-4-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1567665795-5901-1-git-send-email-zhongjiang@huawei.com> References: <1567665795-5901-1-git-send-email-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected 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. It is better to use it directly. hence just replace it. Signed-off-by: zhong jiang --- drivers/phy/tegra/phy-tegra194-p2u.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/phy/tegra/phy-tegra194-p2u.c b/drivers/phy/tegra/phy-tegra194-p2u.c index 7042bed..40bc550 100644 --- a/drivers/phy/tegra/phy-tegra194-p2u.c +++ b/drivers/phy/tegra/phy-tegra194-p2u.c @@ -92,10 +92,8 @@ 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[] = { -- 1.7.12.4