[PATCH] iio: adc: vf610: Add missing check for device_property_read_u32_array

From: Chen Ni

Date: Tue Jan 27 2026 - 23:27:45 EST


Add check for the return value of device_property_read_u32_array() and
return the error if it fails in order to catch the error.

Signed-off-by: Chen Ni <nichen@xxxxxxxxxxx>
---
drivers/iio/adc/vf610_adc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c
index d7182ed0d2a7..d53723ccc5b2 100644
--- a/drivers/iio/adc/vf610_adc.c
+++ b/drivers/iio/adc/vf610_adc.c
@@ -871,7 +871,10 @@ static int vf610_adc_probe(struct platform_device *pdev)

info->vref_uv = regulator_get_voltage(info->vref);

- device_property_read_u32_array(dev, "fsl,adck-max-frequency", info->max_adck_rate, 3);
+ ret = device_property_read_u32_array(dev, "fsl,adck-max-frequency",
+ info->max_adck_rate, 3);
+ if (ret)
+ return ret;

info->adc_feature.default_sample_time = DEFAULT_SAMPLE_TIME;
device_property_read_u32(dev, "min-sample-time", &info->adc_feature.default_sample_time);
--
2.25.1