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)
committerLen Brown <len.brown@intel.com>
Tue, 24 Jul 2012 05:37:37 +0000 (01:37 -0400)
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>
Cc: stable@vger.kernel.org
Signed-off-by: Len Brown <len.brown@intel.com>

No differences found