[PATCH v4 3/9] iio: dac: mcp47feb02: correct false state case in store_eeprom_store

From: Ariana Lazar

Date: Wed Aug 19 2026 - 08:45:44 EST


Return len also when the state is false instead of 0.

Signed-off-by: Ariana Lazar <ariana.lazar@xxxxxxxxxxxxx>
---
drivers/iio/dac/mcp47feb02.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/dac/mcp47feb02.c b/drivers/iio/dac/mcp47feb02.c
index bf78618ac2c896b94e494a1ce76ef5b3e520f482..2ee981393aa1a2dc0bf65d25ab937132fe2e7bf1 100644
--- a/drivers/iio/dac/mcp47feb02.c
+++ b/drivers/iio/dac/mcp47feb02.c
@@ -469,7 +469,7 @@ static ssize_t store_eeprom_store(struct device *dev, struct device_attribute *a
return ret;

if (!state)
- return 0;
+ return len;

/*
* Verify DAC Wiper and DAC Configuration are unlocked. If both are disabled,

--
2.43.0