1
0
Fork 0

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 <johan@hovoldconsulting.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
hifive-unleashed-5.1
Viresh Kumar 2015-12-04 21:30:08 +05:30 committed by Greg Kroah-Hartman
parent c5b6df9c8d
commit 4aac6c5a14
1 changed files with 2 additions and 2 deletions

View File

@ -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;