mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
libata: acpi: avoid passing NULL to ACPI evaluation method
If ACPI handle for an ATA device is NULL, we shouldn't call ata_dev_get_GTF as that function will use handle to do some ACPI evaluation. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
20e64fa429
commit
c75da205e0
1 changed files with 1 additions and 0 deletions
|
@ -835,6 +835,7 @@ void ata_acpi_on_resume(struct ata_port *ap)
|
|||
ata_for_each_dev(dev, &ap->link, ALL) {
|
||||
ata_acpi_clear_gtf(dev);
|
||||
if (ata_dev_enabled(dev) &&
|
||||
ata_dev_acpi_handle(dev) &&
|
||||
ata_dev_get_GTF(dev, NULL) >= 0)
|
||||
dev->flags |= ATA_DFLAG_ACPI_PENDING;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue