]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/ata_piix.c
ATA: piix, fix pointer deref on suspend
[linux-2.6-omap-h63xx.git] / drivers / ata / ata_piix.c
index d6d97d8f3fa4b6cab0d3df24d872577eeaa72952..c11936e13dd3ccd39952b35b242e42dd5e0d1078 100644 (file)
@@ -1072,7 +1072,14 @@ static int piix_broken_suspend(void)
         * matching is necessary because dmi_system_id.matches is
         * limited to four entries.
         */
-       if (!strcmp(dmi_get_system_info(DMI_SYS_VENDOR), "TOSHIBA") &&
+       if (dmi_get_system_info(DMI_SYS_VENDOR) &&
+           dmi_get_system_info(DMI_PRODUCT_NAME) &&
+           dmi_get_system_info(DMI_PRODUCT_VERSION) &&
+           dmi_get_system_info(DMI_PRODUCT_SERIAL) &&
+           dmi_get_system_info(DMI_BOARD_VENDOR) &&
+           dmi_get_system_info(DMI_BOARD_NAME) &&
+           dmi_get_system_info(DMI_BOARD_VERSION) &&
+           !strcmp(dmi_get_system_info(DMI_SYS_VENDOR), "TOSHIBA") &&
            !strcmp(dmi_get_system_info(DMI_PRODUCT_NAME), "000000") &&
            !strcmp(dmi_get_system_info(DMI_PRODUCT_VERSION), "000000") &&
            !strcmp(dmi_get_system_info(DMI_PRODUCT_SERIAL), "000000") &&