]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register()...
authorLan Tianyu <tianyu.lan@intel.com>
Fri, 20 Jul 2012 05:29:16 +0000 (13:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Aug 2012 15:22:54 +0000 (08:22 -0700)
commitca118568299f5e4ec8ad2dcd6776038fb16e6ad3
tree6d49a4d13d6bdf69f588b56a05464e09a58e7cae
parent1cd9be20fd920c807696f7fa2a2f55dcf187f6c0
ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check

commit f197ac13f6eeb351b31250b9ab7d0da17434ea36 upstream.

In the ac.c, power_supply_register()'s return value is not checked.

As a result, the driver's add() ops may return success
even though the device failed to initialize.

For example, some BIOS may describe two ACADs in the same DSDT.
The second ACAD device will fail to register,
but ACPI driver's add() ops returns sucessfully.
The ACPI device will receive ACPI notification and cause OOPS.

https://bugzilla.redhat.com/show_bug.cgi?id=772730

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/ac.c