Skip to content

Commit

Permalink
ti-soc-thermal: Delete an unnecessary check before the function call …
Browse files Browse the repository at this point in the history
…"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>
  • Loading branch information
Markus Elfring authored and Eduardo Valentin committed Feb 24, 2015
1 parent 3992b62 commit 9ca9be2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thermal/ti-soc-thermal/ti-thermal-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ int ti_thermal_unregister_cpu_cooling(struct ti_bandgap *bgp, int id)

data = ti_bandgap_get_sensor_data(bgp, id);

if (data && data->cool_dev)
if (data)
cpufreq_cooling_unregister(data->cool_dev);

return 0;
Expand Down

0 comments on commit 9ca9be2

Please sign in to comment.