summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-11 09:37:19 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-11 09:37:19 +0200
commit265f1ecff7bf570f4fb9eaa0a40110e4e2091cea (patch)
treef8426b236d9121c60ae1f5624a59baf7771b1853
parentLinux 6.3-rc6 (diff)
parentiio: light: tsl2772: fix reading proximity-diodes from device tree (diff)
downloadlinux-265f1ecff7bf570f4fb9eaa0a40110e4e2091cea.tar.xz
linux-265f1ecff7bf570f4fb9eaa0a40110e4e2091cea.zip
Merge tag 'iio-fixes-for-6.3b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus
Jonathan writes: 2nd set of IIO fixes for the 6.3 cycle. adi,ad5755 - Fix missing fwnode_handle_put() in error path. atmel,at91-sam5d2 - Fix error code when trigger allocation fails that would have looked like success. taos,tsl2772 - Store the proximity-diodes value read from the device tree so it is actually used rather than ignored. * tag 'iio-fixes-for-6.3b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: light: tsl2772: fix reading proximity-diodes from device tree iio: dac: ad5755: Add missing fwnode_handle_put() iio: adc: at91-sama5d2_adc: fix an error code in at91_adc_allocate_trigger()
-rw-r--r--drivers/iio/adc/at91-sama5d2_adc.c2
-rw-r--r--drivers/iio/dac/ad5755.c1
-rw-r--r--drivers/iio/light/tsl2772.c1
3 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
index 50d02e5fc6fc..7258912fe17b 100644
--- a/drivers/iio/adc/at91-sama5d2_adc.c
+++ b/drivers/iio/adc/at91-sama5d2_adc.c
@@ -1409,7 +1409,7 @@ static struct iio_trigger *at91_adc_allocate_trigger(struct iio_dev *indio,
trig = devm_iio_trigger_alloc(&indio->dev, "%s-dev%d-%s", indio->name,
iio_device_id(indio), trigger_name);
if (!trig)
- return NULL;
+ return ERR_PTR(-ENOMEM);
trig->dev.parent = indio->dev.parent;
iio_trigger_set_drvdata(trig, indio);
diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
index beadfa938d2d..404865e35460 100644
--- a/drivers/iio/dac/ad5755.c
+++ b/drivers/iio/dac/ad5755.c
@@ -802,6 +802,7 @@ static struct ad5755_platform_data *ad5755_parse_fw(struct device *dev)
return pdata;
error_out:
+ fwnode_handle_put(pp);
devm_kfree(dev, pdata);
return NULL;
}
diff --git a/drivers/iio/light/tsl2772.c b/drivers/iio/light/tsl2772.c
index ad50baa0202c..e823c145f679 100644
--- a/drivers/iio/light/tsl2772.c
+++ b/drivers/iio/light/tsl2772.c
@@ -601,6 +601,7 @@ static int tsl2772_read_prox_diodes(struct tsl2772_chip *chip)
return -EINVAL;
}
}
+ chip->settings.prox_diode = prox_diode_mask;
return 0;
}