From: Andrey Shvetsov Date: Fri, 9 Sep 2016 13:25:39 +0000 (+0200) Subject: staging: most: hdm-usb: unify returned errors X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a27cb25b64d9737df3e12f970ef9b5b638f7907f;p=linux-beck.git staging: most: hdm-usb: unify returned errors 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 Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c index c82b8c1c0fc0..9c9a43835305 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, ®_addr) && get_static_reg_addr(rw_regs, attr->attr.name, ®_addr)) - return -EIO; + return -EFAULT; err = drci_rd_reg(dci_obj->usb_device, reg_addr, &tmp_val); if (err < 0)