mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-16 14:38:49 +00:00
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 <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
This commit is contained in:
parent
7eb4bd723e
commit
5027ba36cd
@ -136,7 +136,7 @@ int thermal_register_governor(struct thermal_governor *governor)
|
|||||||
mutex_lock(&thermal_governor_lock);
|
mutex_lock(&thermal_governor_lock);
|
||||||
|
|
||||||
err = -EBUSY;
|
err = -EBUSY;
|
||||||
if (__find_governor(governor->name) == NULL) {
|
if (!__find_governor(governor->name)) {
|
||||||
err = 0;
|
err = 0;
|
||||||
list_add(&governor->governor_list, &thermal_governor_list);
|
list_add(&governor->governor_list, &thermal_governor_list);
|
||||||
if (!def_governor && !strncmp(governor->name,
|
if (!def_governor && !strncmp(governor->name,
|
||||||
@ -182,7 +182,7 @@ void thermal_unregister_governor(struct thermal_governor *governor)
|
|||||||
|
|
||||||
mutex_lock(&thermal_governor_lock);
|
mutex_lock(&thermal_governor_lock);
|
||||||
|
|
||||||
if (__find_governor(governor->name) == NULL)
|
if (!__find_governor(governor->name))
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
mutex_lock(&thermal_list_lock);
|
mutex_lock(&thermal_list_lock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user