ATA: piix, fix pointer deref on suspend

Hi,

I've found this issue in the mmotm 2008-12-02-17-08.

--

Commit
ata_piix: add borked Tecra M4 to broken suspend list
introduced DMI variables checking, but they can be null, so that
we possibly dereference null.

Check if they are null and avoid checks in that case.

Solves:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
IP: [<ffffffff8043da97>] piix_pci_device_suspend+0x117/0x230

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Alexandru Romanescu <a_romanescu@yahoo.co.uk>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

authored by Jiri Slaby and committed by Jeff Garzik 9ac62126 2456eb81

+8 -1
+8 -1
drivers/ata/ata_piix.c
··· 1072 * matching is necessary because dmi_system_id.matches is 1073 * limited to four entries. 1074 */ 1075 - if (!strcmp(dmi_get_system_info(DMI_SYS_VENDOR), "TOSHIBA") && 1076 !strcmp(dmi_get_system_info(DMI_PRODUCT_NAME), "000000") && 1077 !strcmp(dmi_get_system_info(DMI_PRODUCT_VERSION), "000000") && 1078 !strcmp(dmi_get_system_info(DMI_PRODUCT_SERIAL), "000000") &&
··· 1072 * matching is necessary because dmi_system_id.matches is 1073 * limited to four entries. 1074 */ 1075 + if (dmi_get_system_info(DMI_SYS_VENDOR) && 1076 + dmi_get_system_info(DMI_PRODUCT_NAME) && 1077 + dmi_get_system_info(DMI_PRODUCT_VERSION) && 1078 + dmi_get_system_info(DMI_PRODUCT_SERIAL) && 1079 + dmi_get_system_info(DMI_BOARD_VENDOR) && 1080 + dmi_get_system_info(DMI_BOARD_NAME) && 1081 + dmi_get_system_info(DMI_BOARD_VERSION) && 1082 + !strcmp(dmi_get_system_info(DMI_SYS_VENDOR), "TOSHIBA") && 1083 !strcmp(dmi_get_system_info(DMI_PRODUCT_NAME), "000000") && 1084 !strcmp(dmi_get_system_info(DMI_PRODUCT_VERSION), "000000") && 1085 !strcmp(dmi_get_system_info(DMI_PRODUCT_SERIAL), "000000") &&