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=-10.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable 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 1BBB0C10F14 for ; Wed, 17 Apr 2019 00:52:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D86F0217D4 for ; Wed, 17 Apr 2019 00:52:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728486AbfDQAwx (ORCPT ); Tue, 16 Apr 2019 20:52:53 -0400 Received: from mga04.intel.com ([192.55.52.120]:24370 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728373AbfDQAwx (ORCPT ); Tue, 16 Apr 2019 20:52:53 -0400 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 fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Apr 2019 17:52:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,359,1549958400"; d="scan'208";a="132015520" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by orsmga007.jf.intel.com with ESMTP; 16 Apr 2019 17:52:50 -0700 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1hGYoj-000AVU-TI; Wed, 17 Apr 2019 08:52:49 +0800 Date: Wed, 17 Apr 2019 08:52:13 +0800 From: kbuild test robot To: Heikki Krogerus Cc: kbuild-all@01.org, linux-acpi@vger.kernel.org, devel@acpica.org, linux-pm@vger.kernel.org, "Rafael J. Wysocki" Subject: [PATCH] platform/x86: intel_cht_int33fe: fix ptr_ret.cocci warnings Message-ID: <20190417005213.GA17163@lkp-ne04> References: <201904170807.nArPTXtw%lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201904170807.nArPTXtw%lkp@intel.com> X-Patchwork-Hint: ignore User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: kbuild test robot drivers/platform/x86/intel_cht_int33fe.c:98: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: 7ea0bcd16565 ("platform/x86: intel_cht_int33fe: Register max17047 in its own function") CC: Heikki Krogerus Signed-off-by: kbuild test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge head: 98438d88cbe65037744bdc071720389797f9c575 commit: 7ea0bcd165658c84544d5f241126b782d14fbb7f [80/85] platform/x86: intel_cht_int33fe: Register max17047 in its own function intel_cht_int33fe.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/platform/x86/intel_cht_int33fe.c +++ b/drivers/platform/x86/intel_cht_int33fe.c @@ -95,10 +95,7 @@ cht_int33fe_register_max17047(struct dev board_info.dev_name = "max17047"; board_info.properties = max17047_props; data->max17047 = i2c_acpi_new_device(dev, 1, &board_info); - if (IS_ERR(data->max17047)) - return PTR_ERR(data->max17047); - - return 0; + return PTR_ERR_OR_ZERO(data->max17047); } static const struct property_entry fusb302_props[] = {