In ahci_broken_lpm(), dmi->driver_data is encoded as a date: if the date of the current BIOS is older than driver_data, the LPM horkage is not applied. Allow dmi->driver_data is be empty in case a problem is not fixed in any BIOS version. Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx> --- drivers/ata/ahci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 5f1f049063dd2..9132201f1353e 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1279,6 +1279,9 @@ static bool ahci_broken_lpm(struct pci_dev *pdev) if (!dmi) return false; + if (!dmi->driver_data) + return true; + dmi_get_date(DMI_BIOS_DATE, &year, &month, &date); snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date); -- 2.31.0.291.g576ba9dcdaf-goog