summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0065-ACPI-AC-prevent-OOPS-on-some-boxes-due-to-missing-ch.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0065-ACPI-AC-prevent-OOPS-on-some-boxes-due-to-missing-ch.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0065-ACPI-AC-prevent-OOPS-on-some-boxes-due-to-missing-ch.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0065-ACPI-AC-prevent-OOPS-on-some-boxes-due-to-missing-ch.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0065-ACPI-AC-prevent-OOPS-on-some-boxes-due-to-missing-ch.patch
new file mode 100644
index 00000000..5fa53fb5
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0065-ACPI-AC-prevent-OOPS-on-some-boxes-due-to-missing-ch.patch
@@ -0,0 +1,45 @@
1From 847ccb9086b1b76d8db67f37e36e909727c010cb Mon Sep 17 00:00:00 2001
2From: Lan Tianyu <tianyu.lan@intel.com>
3Date: Fri, 20 Jul 2012 13:29:16 +0800
4Subject: [PATCH 65/73] ACPI/AC: prevent OOPS on some boxes due to missing
5 check power_supply_register() return value check
6
7commit f197ac13f6eeb351b31250b9ab7d0da17434ea36 upstream.
8
9In the ac.c, power_supply_register()'s return value is not checked.
10
11As a result, the driver's add() ops may return success
12even though the device failed to initialize.
13
14For example, some BIOS may describe two ACADs in the same DSDT.
15The second ACAD device will fail to register,
16but ACPI driver's add() ops returns sucessfully.
17The ACPI device will receive ACPI notification and cause OOPS.
18
19https://bugzilla.redhat.com/show_bug.cgi?id=772730
20
21Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
22Signed-off-by: Len Brown <len.brown@intel.com>
23Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
24---
25 drivers/acpi/ac.c | 4 +++-
26 1 files changed, 3 insertions(+), 1 deletions(-)
27
28diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
29index 6512b20..d1fcbc0 100644
30--- a/drivers/acpi/ac.c
31+++ b/drivers/acpi/ac.c
32@@ -292,7 +292,9 @@ static int acpi_ac_add(struct acpi_device *device)
33 ac->charger.properties = ac_props;
34 ac->charger.num_properties = ARRAY_SIZE(ac_props);
35 ac->charger.get_property = get_ac_property;
36- power_supply_register(&ac->device->dev, &ac->charger);
37+ result = power_supply_register(&ac->device->dev, &ac->charger);
38+ if (result)
39+ goto end;
40
41 printk(KERN_INFO PREFIX "%s [%s] (%s)\n",
42 acpi_device_name(device), acpi_device_bid(device),
43--
441.7.7.6
45