Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
[linux-2.6.git] / drivers / misc / pch_phub.c
index d06cf2f..0fd7e77 100644 (file)
@@ -686,6 +686,8 @@ static int __devinit pch_phub_probe(struct pci_dev *pdev,
        }
 
        if (id->driver_data == 1) { /* EG20T PCH */
+               const char *board_name;
+
                retval = sysfs_create_file(&pdev->dev.kobj,
                                           &dev_attr_pch_mac.attr);
                if (retval)
@@ -701,7 +703,8 @@ static int __devinit pch_phub_probe(struct pci_dev *pdev,
                                               CLKCFG_CANCLK_MASK);
 
                /* quirk for CM-iTC board */
-               if (strstr(dmi_get_system_info(DMI_BOARD_NAME), "CM-iTC"))
+               board_name = dmi_get_system_info(DMI_BOARD_NAME);
+               if (board_name && strstr(board_name, "CM-iTC"))
                        pch_phub_read_modify_write_reg(chip,
                                                (unsigned int)CLKCFG_REG_OFFSET,
                                                CLKCFG_UART_48MHZ | CLKCFG_BAUDDIV |