diff options
Diffstat (limited to 'drivers/iio/adc/sun4i-gpadc-iio.c')
-rw-r--r-- | drivers/iio/adc/sun4i-gpadc-iio.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c index 430b06ceb625..c4e70f1cad79 100644 --- a/drivers/iio/adc/sun4i-gpadc-iio.c +++ b/drivers/iio/adc/sun4i-gpadc-iio.c @@ -651,7 +651,11 @@ static int sun4i_gpadc_probe(struct platform_device *pdev) info->tzd = thermal_zone_of_sensor_register(info->sensor_device, 0, info, &sun4i_ts_tz_ops); - if (IS_ERR(info->tzd)) { + /* + * Do not fail driver probing when failing to register in + * thermal because no thermal DT node is found. + */ + if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) { dev_err(&pdev->dev, "could not register thermal sensor: %ld\n", PTR_ERR(info->tzd)); |