Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1386476ybi; Sat, 25 May 2019 00:36:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqz64Ivo6httxSQiVjkaGzagYa8Tkx/Dsmghxi8Hr1gVAlVNSuWczTLjEUxXlNsFqmtNSxGc X-Received: by 2002:a17:90a:71cb:: with SMTP id m11mr13970481pjs.40.1558769776340; Sat, 25 May 2019 00:36:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558769776; cv=none; d=google.com; s=arc-20160816; b=egErazuATQ91GMbzmm3CZokXOj3EYgnK5sD6eAqoIn7sj1U5j8zH9lXw/ZeZv1cPDG Rb9F6c3jJTz+HIL9paNEy7MwuatIs3nsCZTIQqUMWi5xzfCdsL9HAkuRrc65cH0BLfTr C5L5PAp8pdkp4v81mR9+eZ8V2oCzkesRGZ2yiXIz7vGukzhHPm7DAHAwWMZjFSxe3Q/E oI0H7c0n/LX4/X2a0CKxVTlrBw8U73JCKecOkPYmwoo7glslm1BoHIRLC3I/xqjBzPds 43H+6ewciRxpaUjHM/6/t4B4CaIP1yauM187NqaW4Eu4nvlpT3KX/97G6gY2gjtyEffy 7+OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=JvzE9AyV74L/dTo6OIidUVMz2Tg/YkysokYHJ1eyAEI=; b=DQfFPXGA0SuzHmKksANd0n9AloZBUq4Uz/BRKXq9SFJEXnCLu7DojrQcbQxBrPt7BY gUhpmVJ2jmV/q/5HVYHuuVKSrKMhTQGxMBLFTv2S3Ie5eadilhaPdr+T+wIlSrxFIyzC 7QFauzYLAQ1XN3WlbVJKK4yCOEHnXCRDEgEDFHZueW7vmoFSSWsxRZLCtXhfO6gI2JeP lPMRXwkPN1rPrjFK9+StEHxBaZRn+OJjO4UGdCUbkkMdNy6Tu+2NvuWZkewD10oIeVmD FIOnQAKMl7oMuScLUeSUdRgO7Myj6JykLv4zu4AWZwkAmrPCSPF3g3B3kVvP1beogo6m +0nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W1U98WMI; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1si7550595pld.142.2019.05.25.00.36.00; Sat, 25 May 2019 00:36:16 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W1U98WMI; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726437AbfEYHe5 (ORCPT + 99 others); Sat, 25 May 2019 03:34:57 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:39785 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726145AbfEYHe5 (ORCPT ); Sat, 25 May 2019 03:34:57 -0400 Received: by mail-pl1-f196.google.com with SMTP id g9so5041258plm.6 for ; Sat, 25 May 2019 00:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=JvzE9AyV74L/dTo6OIidUVMz2Tg/YkysokYHJ1eyAEI=; b=W1U98WMIUt2Y1NL0+hUD6ifWc5gAad3cySCvCzhQ4hereZF6+1LqJFJGAVKOVG60UI 9jXSo7SC3PVFYkEeh7Rs5UXtH4GFFHc/841cpx3R0dnSILiIiWuKwJQ/MG63RvtGZa2R iTKPOYS+ozX3dyowPA10b/Hw2WrcOsbhX9QvGe1w3X3eGJtxUDHVgn+fYMEUwNHjV1QN Cd6Y1AHaTelpT8Xp+x9wxyKuD8cbq1+wOWtlARrWfdoCoWgA1ff6yY3YkEf5cG2s9r4S 8SjwdmHPVxdqFaxlxDrnwPqV2D9+MlJtT4RLt5b6gVhpbYTvIYPCxmOm50bsVb2esdIK QA4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=JvzE9AyV74L/dTo6OIidUVMz2Tg/YkysokYHJ1eyAEI=; b=afM6nq9gTmj5fK3ckvA2NtswzCqZsBuTxHOmzRbT3vjtL22A4OaKW1oWufNi8KQHaB V3DaAgz8RcmFPQLUFk4mK0vV5u7345R+qUqQECxzPjdrZ4Arcffe0TPTg0Aab7xxxcnj edcB4WC86ooNEOMivEGg3BQSIMSmuUNmP4wokTN3OlkI58SbHg5K60ujVq2/UUnjggTE YLVeU2ywluOEJJTSHuhUis64fFtsfqZMpmvUfIMK/lPvfrau8+3E8xNLL4gOmGhMcF/r E7c2tGL6EoHO/Uo/CSeM1Mt48v/lBatSPUglaPfCom8PLegOEMsEPhVHGGU4lr9hNJEJ OqEg== X-Gm-Message-State: APjAAAWTVp1jfo+fphRNBjIvv+J+c6g7N9ujavbK0SQObe93HmJifXrc galGV370/eaDASNiykewdZo= X-Received: by 2002:a17:902:9a07:: with SMTP id v7mr112122498plp.180.1558769696584; Sat, 25 May 2019 00:34:56 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id v93sm4512115pjb.6.2019.05.25.00.34.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 May 2019 00:34:56 -0700 (PDT) Date: Sat, 25 May 2019 13:04:49 +0530 From: Hariprasad Kelam To: Harry Wentland , Leo Li , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter , hersen wu , Nicholas Kazlauskas , David Francis , Hariprasad Kelam , kbuild test robot , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amd: fix warning PTR_ERR_OR_ZERO can be used Message-ID: <20190525073449.GA7278@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix below warnings reported by coccicheck ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c:1057:1-3: WARNING: PTR_ERR_OR_ZERO can be used Signed-off-by: Hariprasad Kelam --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c index 1d5fc5a..1b1ec12 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c @@ -1054,8 +1054,6 @@ int dtn_debugfs_init(struct amdgpu_device *adev) ent = debugfs_create_file_unsafe("amdgpu_dm_visual_confirm", 0644, root, adev, &visual_confirm_fops); - if (IS_ERR(ent)) - return PTR_ERR(ent); - return 0; + return PTR_ERR_OR_ZERO(ent); } -- 2.7.4