From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2E5AC63777 for ; Mon, 16 Nov 2020 23:01:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B54520637 for ; Mon, 16 Nov 2020 23:01:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728630AbgKPXBW (ORCPT ); Mon, 16 Nov 2020 18:01:22 -0500 Received: from mga01.intel.com ([192.55.52.88]:9603 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727716AbgKPXBT (ORCPT ); Mon, 16 Nov 2020 18:01:19 -0500 IronPort-SDR: J6TkvbO2j47dykEKzpyOgzCFsyVoWc2mnAu4WyO77bvkjULhQZNCj5mIOQHG19bgQXGUIGgq4i KQzJ6CfZnT7A== X-IronPort-AV: E=McAfee;i="6000,8403,9807"; a="188879589" X-IronPort-AV: E=Sophos;i="5.77,483,1596524400"; d="scan'208";a="188879589" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2020 15:01:15 -0800 IronPort-SDR: 5npUPPpJhqfyTGxW87HmYPH9bPeO4JNyAzAB4Y5Q11tEZLQYWs8mLmrmZGmjmuegcF3Nf8Fk7w ZCFZkpg9kqGA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,483,1596524400"; d="scan'208";a="400591412" Received: from lkp-server01.sh.intel.com (HELO fb398427a497) ([10.239.97.150]) by orsmga001.jf.intel.com with ESMTP; 16 Nov 2020 15:01:11 -0800 Received: from kbuild by fb398427a497 with local (Exim 4.92) (envelope-from ) id 1kenUk-0000FF-Eq; Mon, 16 Nov 2020 23:01:10 +0000 Date: Tue, 17 Nov 2020 07:00:32 +0800 From: kernel test robot To: Tiezhu Yang Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Vinod Koul , Heiko Stuebner , Kishon Vijay Abraham I , Thierry Reding , Jonathan Hunter , linux-tegra@vger.kernel.org Subject: [PATCH] phy: fix ptr_ret.cocci warnings Message-ID: <20201116230032.GA34534@8312513de428> References: <202011170710.Dsd9lxrR-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202011170710.Dsd9lxrR-lkp@intel.com> X-Patchwork-Hint: ignore User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org From: kernel test robot drivers/phy/tegra/phy-tegra194-p2u.c:95: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 Fixes: 133552bf03ed ("phy: Remove CONFIG_ARCH_* check for related subdir in Makefile") CC: Tiezhu Yang Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 09162bc32c880a791c6c0668ce0745cf7958f576 commit: 133552bf03edbe3892767a4b64c56e3bed746374 phy: Remove CONFIG_ARCH_* check for related subdir in Makefile phy-tegra194-p2u.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- 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 platfo 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[] = {