Skip to content
Commit 89a3fd35 authored by Jan Beulich's avatar Jan Beulich Committed by Guenter Roeck
Browse files

x86/hwmon: fix module init for hotplug-but-no-device-found case

In commit 0dca94ba

 the call to
platform_driver_unregister() was made conditional upon !HOTPLUG_CPU,
but the return value from coretemp_init() was left to indicate an
error. This isn't correct, as the negative return value indicates to
the module loader that initialization failed, which isn't intended
here and results in dangling pointers.

Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
Cc: Chen Gong <gong.chen@linux.intel.com>
Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
parent f7c77a3d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment