]> git.baikalelectronics.ru Git - kernel.git/commit
x86/hwmon: fix module init for hotplug-but-no-device-found case
authorJan Beulich <jbeulich@novell.com>
Mon, 13 Sep 2010 10:05:51 +0000 (10:05 +0000)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Fri, 24 Sep 2010 18:44:18 +0000 (11:44 -0700)
commit8d523c84dfb53f26ac218072ae91836d70607fe2
treec558ed6e5b37bff0ed2d8d6e7b0ca3832547a21f
parent61cf81a7746ab9fc41026217534f7e2422eb29f8
x86/hwmon: fix module init for hotplug-but-no-device-found case

In commit 267bd68bf5fadcee3aab9fb4d3862be453888287 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: Jan Beulich <jbeulich@novell.com>
Cc: Chen Gong <gong.chen@linux.intel.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
drivers/hwmon/coretemp.c