From: kbuild test robot <lkp@intel.com>
To: Tri Vo <trong@android.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>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH] PM / wakeup: fix ptr_ret.cocci warnings
Date: Tue, 23 Jul 2019 22:03:37 +0800 [thread overview]
Message-ID: <20190723140337.GA54192@lkp-kbuild04> (raw)
In-Reply-To: <201907232235.iRDGgF0x%lkp@intel.com>
From: kbuild test robot <lkp@intel.com>
drivers/base/power/wakeup_stats.c:143: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: 0b050f7fb8a1 ("PM / wakeup: show wakeup sources stats in sysfs")
CC: Tri Vo <trong@android.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
---
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head: 14b99dcec44e7bca9f01e042002f57e9f0dda133
commit: 0b050f7fb8a1e45c72ca945bac2821a59d4a0101 [21/23] PM / wakeup: show wakeup sources stats in sysfs
wakeup_stats.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/base/power/wakeup_stats.c
+++ b/drivers/base/power/wakeup_stats.c
@@ -140,10 +140,7 @@ EXPORT_SYMBOL_GPL(wakeup_source_sysfs_re
static int __init wakeup_sources_sysfs_init(void)
{
wakeup_class = class_create(THIS_MODULE, "wakeup");
- if (IS_ERR(wakeup_class))
- return PTR_ERR(wakeup_class);
-
- return 0;
+ return PTR_ERR_OR_ZERO(wakeup_class);
}
postcore_initcall(wakeup_sources_sysfs_init);
next prev parent reply other threads:[~2019-07-23 14:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 14:03 [pm:bleeding-edge 21/23] drivers/base/power/wakeup_stats.c:143:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2019-07-23 14:03 ` kbuild test robot [this message]
2019-07-23 16:27 ` [PATCH] PM / wakeup: fix ptr_ret.cocci warnings Tri Vo
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=20190723140337.GA54192@lkp-kbuild04 \
--to=lkp@intel.com \
--cc=devel@acpica.org \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@01.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=trong@android.com \
/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