Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ti-soc-thermal: Delete an unnecessary check before the function call "cpufreq_cooling_unregister"

The cpufreq_cooling_unregister() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>

authored by

Markus Elfring and committed by
Eduardo Valentin
9ca9be2b 3992b62d

+1 -1
+1 -1
drivers/thermal/ti-soc-thermal/ti-thermal-common.c
··· 429 429 430 430 data = ti_bandgap_get_sensor_data(bgp, id); 431 431 432 - if (data && data->cool_dev) 432 + if (data) 433 433 cpufreq_cooling_unregister(data->cool_dev); 434 434 435 435 return 0;