]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/tty/serial/sc16is7xx.c
Merge remote-tracking branch 'tty/tty-next'
[karo-tx-linux.git] / drivers / tty / serial / sc16is7xx.c
index 55b61d79e75770ada22902588106beee0411720b..edb5305b9d4da72e388452f66db9e65e40d15f18 100644 (file)
@@ -1321,6 +1321,9 @@ static int sc16is7xx_spi_probe(struct spi_device *spi)
                const struct of_device_id *of_id =
                        of_match_device(sc16is7xx_dt_ids, &spi->dev);
 
+               if (!of_id)
+                       return -ENODEV;
+
                devtype = (struct sc16is7xx_devtype *)of_id->data;
        } else {
                const struct spi_device_id *id_entry = spi_get_device_id(spi);
@@ -1379,6 +1382,9 @@ static int sc16is7xx_i2c_probe(struct i2c_client *i2c,
                const struct of_device_id *of_id =
                                of_match_device(sc16is7xx_dt_ids, &i2c->dev);
 
+               if (!of_id)
+                       return -ENODEV;
+
                devtype = (struct sc16is7xx_devtype *)of_id->data;
        } else {
                devtype = (struct sc16is7xx_devtype *)id->driver_data;
@@ -1419,7 +1425,6 @@ static struct i2c_driver sc16is7xx_i2c_uart_driver = {
        .id_table       = sc16is7xx_i2c_id_table,
 };
 
-MODULE_ALIAS("i2c:sc16is7xx");
 #endif
 
 static int __init sc16is7xx_init(void)