]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: intel-uncore-freq: fix uncore_freq_common_init() error codes
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 4 Mar 2022 13:19:25 +0000 (16:19 +0300)
committerHans de Goede <hdegoede@redhat.com>
Tue, 8 Mar 2022 15:33:23 +0000 (16:33 +0100)
commit57575277ce07af922c3d68d4901a48cc8f31c299
tree02071ff85116c54a23843f53a6320e764d503386
parentee457f7d706d15ce3e9f47476c82267a77db2bce
platform/x86: intel-uncore-freq: fix uncore_freq_common_init() error codes

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.

Fixes: 0a18511c3494 ("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>
drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c
drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c