[PATCH 5/9] staging: most: hdm-usb: unify returned errors

Christian Gromm christian.gromm at microchip.com
Fri Sep 9 13:25:39 UTC 2016


From: Andrey Shvetsov <andrey.shvetsov at k2l.de>

This patch is needed to return the same error codes for the same error
cases in the functions show_value() and store_value().

Signed-off-by: Andrey Shvetsov <andrey.shvetsov at k2l.de>
Signed-off-by: Christian Gromm <christian.gromm at microchip.com>
---
 drivers/staging/most/hdm-usb/hdm_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index 203c4a4..b3abab6 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -1083,7 +1083,7 @@ static ssize_t show_value(struct most_dci_obj *dci_obj,
 		reg_addr = dci_obj->reg_addr;
 	else if (get_static_reg_addr(ro_regs, attr->attr.name, &reg_addr) &&
 		 get_static_reg_addr(rw_regs, attr->attr.name, &reg_addr))
-		return -EIO;
+		return -EFAULT;
 
 	err = drci_rd_reg(dci_obj->usb_device, reg_addr, &tmp_val);
 	if (err < 0)
-- 
1.9.1



More information about the devel mailing list