]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: most: hdm-usb: unify returned errors
authorAndrey Shvetsov <andrey.shvetsov@k2l.de>
Fri, 9 Sep 2016 13:25:39 +0000 (15:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Sep 2016 07:47:15 +0000 (09:47 +0200)
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@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/hdm-usb/hdm_usb.c

index c82b8c1c0fc063357ae065038f0d6f33f6fc5cb6..9c9a438353058969b92d0713fc38c7fb40388ddd 100644 (file)
@@ -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)