aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/touchscreen/ads7846.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index da201b8e37dc..e57ba52bf484 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1302,8 +1302,10 @@ static int ads7846_probe(struct spi_device *spi)
1302 pdata = dev_get_platdata(&spi->dev); 1302 pdata = dev_get_platdata(&spi->dev);
1303 if (!pdata) { 1303 if (!pdata) {
1304 pdata = ads7846_probe_dt(&spi->dev); 1304 pdata = ads7846_probe_dt(&spi->dev);
1305 if (IS_ERR(pdata)) 1305 if (IS_ERR(pdata)) {
1306 return PTR_ERR(pdata); 1306 err = PTR_ERR(pdata);
1307 goto err_free_mem;
1308 }
1307 } 1309 }
1308 1310
1309 ts->model = pdata->model ? : 7846; 1311 ts->model = pdata->model ? : 7846;