From: kbuild test robot <lkp@intel.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: kbuild-all@01.org, linux-acpi@vger.kernel.org, devel@acpica.org,
linux-pm@vger.kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: [PATCH] platform/x86: intel_cht_int33fe: fix ptr_ret.cocci warnings
Date: Wed, 17 Apr 2019 08:52:13 +0800 [thread overview]
Message-ID: <20190417005213.GA17163@lkp-ne04> (raw)
In-Reply-To: <201904170807.nArPTXtw%lkp@intel.com>
From: kbuild test robot <lkp@intel.com>
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 <heikki.krogerus@linux.intel.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
---
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[] = {
prev parent reply other threads:[~2019-04-17 0:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-17 0:52 [pm:bleeding-edge 80/85] drivers/platform/x86/intel_cht_int33fe.c:98:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2019-04-17 0:52 ` kbuild test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190417005213.GA17163@lkp-ne04 \
--to=lkp@intel.com \
--cc=devel@acpica.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=kbuild-all@01.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox