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: dbce412a7733 ("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>
                ++uncore_instance_count;
        mutex_unlock(&uncore_lock);
 
-       return (!!uncore_root_kobj);
+       return uncore_root_kobj ? 0 : -ENOMEM;
 }
 EXPORT_SYMBOL_NS_GPL(uncore_freq_common_init, INTEL_UNCORE_FREQUENCY);
 
 
 
        ret = uncore_freq_common_init(uncore_read_control_freq, uncore_write_control_freq,
                                      uncore_read_freq);
-       if (!ret)
+       if (ret)
                goto err_free;
 
        ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,