From patchwork Tue Aug 28 20:00:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 10579043 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8FB4514BD for ; Tue, 28 Aug 2018 20:01:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81FF32AD15 for ; Tue, 28 Aug 2018 20:01:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7ADA72ACB8; Tue, 28 Aug 2018 20:01:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 65F7D2AD19 for ; Tue, 28 Aug 2018 20:01:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A543A6E408; Tue, 28 Aug 2018 20:01:28 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id E7E456E406 for ; Tue, 28 Aug 2018 20:01:24 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2018 13:01:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,300,1531810800"; d="scan'208";a="68566781" Received: from bee.sh.intel.com (HELO lkp-server01) ([10.239.97.14]) by orsmga007.jf.intel.com with ESMTP; 28 Aug 2018 13:01:23 -0700 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1fukAj-000CH5-A9; Wed, 29 Aug 2018 04:01:05 +0800 Date: Wed, 29 Aug 2018 04:00:57 +0800 From: kbuild test robot To: Nicholas Kazlauskas Subject: [PATCH] drm/amd/display: fix ptr_ret.cocci warnings Message-ID: <20180828200057.GA13565@lkp-wsm-ep2> References: <201808290454.H1lIvEzS%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201808290454.H1lIvEzS%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Deucher , kbuild-all@01.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:771: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: e498eb713604 ("drm/amd/display: Add support for hw_state logging via debugfs") CC: Nicholas Kazlauskas Signed-off-by: kbuild test robot --- tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.20-wip head: bdb1922abd620d24715906bac4d119274d98f4c9 commit: e498eb7136042aa9a352b1039c678537f4694158 [220/235] drm/amd/display: Add support for hw_state logging via debugfs amdgpu_dm_debugfs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c @@ -768,8 +768,5 @@ int dtn_debugfs_init(struct amdgpu_devic adev, &dtn_log_fops); - if (IS_ERR(ent)) - return PTR_ERR(ent); - - return 0; + return PTR_ERR_OR_ZERO(ent); }