From: Eduardo Valentin Date: Tue, 8 Nov 2016 05:09:20 +0000 (-0800) Subject: thermal: core: small style fix when checking for __find_governor() X-Git-Tag: v4.10-rc1~160^2~1^4~7 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5027ba36cda6924488b5752820503cdf7a79dbe9;p=karo-tx-linux.git thermal: core: small style fix when checking for __find_governor() Remove style issue: CHECK: Comparison to NULL could be written "!__find_governor" + if (__find_governor(governor->name) == NULL) { Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui --- diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 09d521a56c6f..f19fe03e919f 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);