]> git.karo-electronics.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)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 17 Aug 2012 19:35:44 +0000 (15:35 -0400)
commit7e87b719a6d20bf63c25a9b5776ea39bab8051db
tree697c0aee8e83d62729aa8ef1c0851578d6b08389
parentf5ffe713138d849096a56b88c26c38544ae72d7b
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: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/acpi/ac.c