Received: by 10.192.165.148 with SMTP id m20csp468798imm; Fri, 4 May 2018 13:18:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZou+Uw+OTw6K2Fe8P2a0RJZ1s10HPbYryFEXn36uXmqgVLnWJ2/EG7YK06dHh6g+JtE2BqD X-Received: by 2002:a63:b60d:: with SMTP id j13-v6mr23454355pgf.451.1525465095255; Fri, 04 May 2018 13:18:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525465095; cv=none; d=google.com; s=arc-20160816; b=gEDZQ6FkkTskSqNPvE4GMSL4iUW0Qpvx9cTyA2zDLd+089D0I29CBdfqydyx8A0AKz gagrsjMxhk7EpY2uR7SQvnhQiaMoTo1zuYGEwYD2n7BdHgBd/ZuJg1uYUEjUNfV2kjhz 0wOQNwe6iY1DNwpgqaCjPx/F1eZXkTKN+hcw8YMpq5Qk2eM+XyPiREJqkpC1m+VJHRNx Qo2rQHvk1j9Yo+RtF5UUviPPc6nhIUMosNFctON26h0KBy+UFfZ7e9SLHZD+9Gi37QAD ifCn8VDyYl3jcbFbbsUqLBfv+eL48qX7mbNA92xoKZti4AdVGkESAFjAEhbXm3v711Ya sPjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=2qtpTRF6yOPTyVCJW5fddxNL+obY3Cpm2XA1u4ACIUw=; b=C0ZDJmfjR98aLQwBfFUFKNDqGsmBsh4tNuVf0kVRLh1q7cQe9QvhVz1OS8jO/oB/DW xflp/HCLsKEDL+qDEh8zBUHRkLaNDkW1MPkAcT77/QlacA12UN3ow17aBvRfqWmLm9jy GtfxReL/tX5+GZnY0Y48bOscC/3mCh9Fl7/Cts771avD/PsGacIjCp8ShqlXCDvSvEuw nohJInnHk7HT0JY+zbM0qxofRmHb3hdSN/LtPxngfPk9jw/hU0EjKfgOkFJ8GHI9ABnM 3hvHKKYxhJNXt3ddVCXlRGtJR7o7R6BiQn70fPlYyZDO4vyDZks23V7lDwt200fWXejg OwtQ== 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 s67-v6si7329994pgc.204.2018.05.04.13.18.00; Fri, 04 May 2018 13:18:15 -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 S1751802AbeEDUQP (ORCPT + 99 others); Fri, 4 May 2018 16:16:15 -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-Type: text/plain; charset=us-ascii 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) --- 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 = {