thermal: thermal_core: remove usage of IS_ERR_OR_NULL
thermal: thermal_core: remove usage of IS_ERR_OR_NULL

This patch changes the driver to avoid the usage of IS_ERR_OR_NULL()
macro. This macro can lead to dangerous results, like returning
success (0) during a failure scenario (NULL pointer handling).

The case present in this patch has simply be translated to
normal check for NULL and if the pointer has an error code.
The later case is needed because functions like
thermal_zone_get_zone_by_name() could return an ERR_PTR().

Cc: Zhang Rui <f2a4cf793007be8f81a774dc7806c1ffea7b4a2c@intel.com>
Cc: Russell King <c2093e01fa868776d7876ac617ce6d2ac30cb904@arm.linux.org.uk>
Cc: b46218f6b44e9c202c4acd9f095c69546b4b0dff@vger.kernel.org
Cc: 2578944098299abf708b08eff6fcf60565553586@vger.kernel.org
Signed-off-by: Eduardo Valentin <977df7d8e3020f3c4acf757f6ad9c6cf2bc8f2d7@ti.com>
Signed-off-by: Zhang Rui <f2a4cf793007be8f81a774dc7806c1ffea7b4a2c@intel.com>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas