Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1409830
| From | Eduardo Valentin <edubezval@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCHv4 42/48] thermal: core: small style fix when checking for __find_governor() |
| Date | 2016-05-31 08:30 +0200 |
| Message-ID | <rELlD-7d7-1@gated-at.bofh.it> (permalink) |
| References | <rELbY-79h-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Remove style issue:
CHECK: Comparison to NULL could be written "!__find_governor"
+ if (__find_governor(governor->name) == NULL) {
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
---
drivers/thermal/thermal_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index f653090..cbc5954 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -136,7 +136,7 @@ int thermal_register_governor(struct thermal_governor *governor)
mutex_lock(&thermal_governor_lock);
err = -EBUSY;
- if (__find_governor(governor->name) == NULL) {
+ if (!__find_governor(governor->name)) {
err = 0;
list_add(&governor->governor_list, &thermal_governor_list);
if (!def_governor && !strncmp(governor->name,
@@ -182,7 +182,7 @@ void thermal_unregister_governor(struct thermal_governor *governor)
mutex_lock(&thermal_governor_lock);
- if (__find_governor(governor->name) == NULL)
+ if (!__find_governor(governor->name))
goto exit;
mutex_lock(&thermal_list_lock);
--
2.1.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCHv4 42/48] thermal: core: small style fix when checking for __find_governor() Eduardo Valentin <edubezval@gmail.com> - 2016-05-31 08:30 +0200
csiph-web