From patchwork Fri May 4 20:16:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 10381635 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D313060353 for ; Fri, 4 May 2018 20:16:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD96629508 for ; Fri, 4 May 2018 20:16:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B08C6295A8; Fri, 4 May 2018 20:16:16 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EFAC29508 for ; Fri, 4 May 2018 20:16:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751774AbeEDUQO (ORCPT ); Fri, 4 May 2018 16:16:14 -0400 Received: from mga03.intel.com ([134.134.136.65]:10316 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751748AbeEDUQM (ORCPT ); Fri, 4 May 2018 16:16:12 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 May 2018 13:16:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,363,1520924400"; d="scan'208";a="225868955" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga005.fm.intel.com with ESMTP; 04 May 2018 13:16:10 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1fEh7h-000LxQ-NU; Sat, 05 May 2018 04:16:09 +0800 Date: Sat, 5 May 2018 04:16:06 +0800 From: kbuild test robot To: Akshu Agrawal Cc: kbuild-all@01.org, djkurtz@chromium.org, akshu.agrawal@amd.com, Alexander.Deucher@amd.com, "Rafael J. Wysocki" , Len Brown , "open list:ACPI" , open list Subject: [PATCH] ACPI: APD: fix ptr_ret.cocci warnings Message-ID: <20180504201606.GA22737@lkp-wsm-ep1> References: <1525422930-27826-2-git-send-email-akshu.agrawal@amd.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1525422930-27826-2-git-send-email-akshu.agrawal@amd.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fengguang Wu drivers/acpi/acpi_apd.c:114: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: 451cec30ec2b ("ACPI: APD: Add AMD misc clock handler support") CC: Akshu Agrawal Signed-off-by: Fengguang Wu --- acpi_apd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/acpi/acpi_apd.c +++ b/drivers/acpi/acpi_apd.c @@ -111,10 +111,7 @@ static int st_misc_setup(struct apd_priv clkdev = platform_device_register_data(&adev->dev, "clk-st", PLATFORM_DEVID_NONE, clk_data, sizeof(*clk_data)); - if (IS_ERR(clkdev)) - return PTR_ERR(clkdev); - - return 0; + return PTR_ERR_OR_ZERO(clkdev); } static const struct apd_device_desc cz_i2c_desc = {