diff options
| author | Markus Elfring <elfring@users.sourceforge.net> | 2015-02-03 05:15:14 -0500 |
|---|---|---|
| committer | Eduardo Valentin <edubezval@gmail.com> | 2015-02-24 13:26:56 -0500 |
| commit | 9ca9be2b09ea1b5289b936e917c8a93119a65736 (patch) | |
| tree | fab1f1f8d8e0e27759a8626b1483eea831160a0c | |
| parent | 3992b62da72d124698bf6157889ab45197ddec69 (diff) | |
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>
| -rw-r--r-- | drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c index 3fb054a10f6a..a38c1756442a 100644 --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c | |||
| @@ -429,7 +429,7 @@ int ti_thermal_unregister_cpu_cooling(struct ti_bandgap *bgp, int id) | |||
| 429 | 429 | ||
| 430 | data = ti_bandgap_get_sensor_data(bgp, id); | 430 | data = ti_bandgap_get_sensor_data(bgp, id); |
| 431 | 431 | ||
| 432 | if (data && data->cool_dev) | 432 | if (data) |
| 433 | cpufreq_cooling_unregister(data->cool_dev); | 433 | cpufreq_cooling_unregister(data->cool_dev); |
| 434 | 434 | ||
| 435 | return 0; | 435 | return 0; |
