power: remove redundant close of frequency file
authorAnatoly Burakov <anatoly.burakov@intel.com>
Wed, 7 Apr 2021 15:56:42 +0000 (15:56 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 15 Apr 2021 21:53:33 +0000 (23:53 +0200)
commit64f22b91c6694e71a5163e7f33a55655fd260f90
tree0c11fd711d97e737f764f4fdfdcac8ef5718da92
parent8f5ea6a464ac5894970dc6463f85538f2f5dc2bb
power: remove redundant close of frequency file

Previous fix has addressed the incorrect handling of `base_frequency`
file, but has added a use-after-free error due to the fact that all
further code paths will lead to an `fclose()` call at the end, so the
additional `fclose()` call right after processing the file was
unnecessary.

Coverity issue: 369901
Fixes: 8a5febaac4f7 ("power: fix P-state base frequency handling")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Liang Ma <liangma@liangbit.com>
Acked-by: David Hunt <david.hunt@intel.com>
lib/librte_power/power_pstate_cpufreq.c