iio: adc: sun4i-gpadc-iio: do not fail probing when no thermal DT node
authorQuentin Schulz <quentin.schulz@free-electrons.com>
Tue, 26 Sep 2017 12:52:19 +0000 (14:52 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 9 Oct 2017 19:49:47 +0000 (20:49 +0100)
commit3b455cdc49e8d91e84184e60e01a390c7eb23134
treec9ccc039082d86e08ba305d03d3fa2f5341d8a2d
parentb0a242894f11d2a357a77e0eedebb16477151ddd
iio: adc: sun4i-gpadc-iio: do not fail probing when no thermal DT node

Before this patch, forgetting to put a thermal-zones DT node would
result in the driver failing to probe.

It should be perfectly acceptable to have the driver probe even if no
thermal-zones DT is found. However, it shouldn't want to fail if the
thermal registering fail for any other reason (waiting for other drivers
for example) so check on ENODEV only.

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/sun4i-gpadc-iio.c