Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / drivers / pci / hotplug / acpi_pcihp.c
index 0f32571b94df406d09c9cbf024d2c11dd41bc89e..3c76fc67cf0e62f8598877881ce40efb0c7a12ae 100644 (file)
@@ -362,6 +362,8 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev, u32 flags)
                status = acpi_pci_osc_control_set(handle, flags);
                if (ACPI_SUCCESS(status))
                        goto got_one;
+               if (status == AE_SUPPORT)
+                       goto no_control;
                kfree(string.pointer);
                string = (struct acpi_buffer){ ACPI_ALLOCATE_BUFFER, NULL };
        }
@@ -394,10 +396,9 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev, u32 flags)
                if (ACPI_FAILURE(status))
                        break;
        }
-
+no_control:
        dbg("Cannot get control of hotplug hardware for pci %s\n",
            pci_name(pdev));
-
        kfree(string.pointer);
        return -ENODEV;
 got_one: