aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2008-05-08 01:37:25 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-05-13 12:51:53 -0400
commit21e2b0a5efb3a01de58e7cb630f2eb70894da352 (patch)
tree7bf83b7fa2de1c10defdbcac59bf626ffbb87fcd /drivers/pci
parentc714a534d85576af21b06be605ca55cb2fb887ee (diff)
PCI ACPI: fix uninitialized variable in __pci_osc_support_set
Fix uninitialized variable in __pci_osc_support_set(). If the ACPI namespace doesn't have any device object corresponding to the specified hid, 'retval' in __pci_osc_support_set() is not changed by the acpi_query_osc() callback. Since 'retval' is not initizlized in the current implementation, the contents of 'retval' is undefined in this case. This causes a mis-handling of ctrlset_buf[OSC_SUPPORT_TYPE] and will cause an unexpected result in the subsequent pci_osc_control_set() call as a result. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-acpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 72f7476930c8..ddfd756fc8ed 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -166,7 +166,7 @@ run_osc_out:
166acpi_status __pci_osc_support_set(u32 flags, const char *hid) 166acpi_status __pci_osc_support_set(u32 flags, const char *hid)
167{ 167{
168 u32 temp; 168 u32 temp;
169 acpi_status retval; 169 acpi_status retval = AE_NOT_FOUND;
170 170
171 if (!(flags & OSC_SUPPORT_MASKS)) { 171 if (!(flags & OSC_SUPPORT_MASKS)) {
172 return AE_TYPE; 172 return AE_TYPE;