platform/x86: intel-uncore-freq: fix uncore_freq_common_init() error codes
mainline inclusion from mainline-v5.18-rc1 commit f2a6c7e7 category: feature bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I8WOEG Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f2a6c7e7474001842a4adaf042d12206c27fc391 ------------------------------------- Currently the uncore_freq_common_init() return one on success and zero on failure. There is only one caller and it has a "forgot to set the error code" bug. Change uncore_freq_common_init() to return negative error codes which makes the code simpler and avoids this kind of bug in the future. Intel-SIG: commit f2a6c7e7 platform/x86: intel-uncore-freq: fix uncore_freq_common_init() error codes. Backport Intel-uncore-freq driver support on TPMI. Fixes: dbce412a ("platform/x86/intel-uncore-freq: Split common and enumeration part") Signed-off-by:Dan Carpenter <dan.carpenter@oracle.com> Acked-by:
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://lore.kernel.org/r/20220304131925.GG28739@kili Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Hans de Goede <hdegoede@redhat.com> [ Yingbao Jia: amend commit log ] Signed-off-by:
Yingbao Jia <yingbao.jia@intel.com>
Loading
Please sign in to comment