thermal: cpu_cooling: free power table on error or when unregistering
commit
eba4f88d5af84e0fcaa5d6eb4fe35a75c47203cb upstream.
The power table is not being freed on error from cpufreq_cooling
register or when unregistering. Free it.
Fixes: c36cf0717631 ("thermal: cpu_cooling: implement the power cooling device API")
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>