From: Viresh Kumar Date: Fri, 4 Dec 2015 16:00:08 +0000 (+0530) Subject: greybus: svc: Use -EIO instead of -EINVAL for unipro errors X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4aac6c5a144921448237d2a2bff50d4fba0b0faf;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: svc: Use -EIO instead of -EINVAL for unipro errors -EIO fits better here, rather than -EINVAL as the arguments to the routine itself are valid, just that we failed while doing unipro transfers. Suggested-by: Johan Hovold Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c index 7037125e5cb7..220aed0168af 100644 --- a/drivers/staging/greybus/svc.c +++ b/drivers/staging/greybus/svc.c @@ -94,7 +94,7 @@ int gb_svc_dme_peer_get(struct gb_svc *svc, u8 intf_id, u16 attr, u16 selector, if (result) { dev_err(&svc->dev, "UniPro error while getting DME attribute (%hhu %hx %hu): %hu\n", intf_id, attr, selector, result); - return -EINVAL; + return -EIO; } if (value) @@ -130,7 +130,7 @@ int gb_svc_dme_peer_set(struct gb_svc *svc, u8 intf_id, u16 attr, u16 selector, if (result) { dev_err(&svc->dev, "UniPro error while setting DME attribute (%hhu %hx %hu %u): %hu\n", intf_id, attr, selector, value, result); - return -EINVAL; + return -EIO; } return 0;