Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI/PCI: Fix return value of acpi_cuery_osc()

If acpi_query_osc() returns other than AE_OK, __pci_osc_support_set()
stops scanning ACPI objects to evaluate _OSC. This prevents subsequent
_OSCs from being evaluated if some of root bridge doesn't have _OSC, for
example. So acpi_query_osc() should return always AE_OK to evaluate all
_OSC.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

authored by

Taku Izumi and committed by
Jesse Barnes
ab20440c adf411b8

+3 -4
+3 -4
drivers/pci/pci-acpi.c
··· 149 149 150 150 status = acpi_get_handle(handle, "_OSC", &tmp); 151 151 if (ACPI_FAILURE(status)) 152 - return status; 152 + return AE_OK; 153 153 154 154 mutex_lock(&pci_acpi_lock); 155 155 osc_data = acpi_get_osc_data(handle); 156 156 if (!osc_data) { 157 157 printk(KERN_ERR "acpi osc data array is full\n"); 158 - status = AE_ERROR; 159 158 goto out; 160 159 } 161 160 162 - status = __acpi_query_osc(flags, osc_data, &dummy); 161 + __acpi_query_osc(flags, osc_data, &dummy); 163 162 out: 164 163 mutex_unlock(&pci_acpi_lock); 165 - return status; 164 + return AE_OK; 166 165 } 167 166 168 167 /**