summaryrefslogtreecommitdiff
path: root/drivers/staging/most
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2020-06-22 10:48:14 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-25 15:40:28 +0200
commit78aee6516670d1f8f4e74e5982ea8d557f114b2b (patch)
tree1ed853a64f53f1745e68c01777f675f96fd70b0c /drivers/staging/most
parente8e0f7fd7715de745ef522b5ed96e1f947e3fb91 (diff)
staging: most: cdev: fix return values
This patch makes use of the proper return values when reporting an error to the caller. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1592815695-19305-6-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r--drivers/staging/most/cdev/cdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
index d374cc05e447..aa7d7afd7d83 100644
--- a/drivers/staging/most/cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -326,7 +326,7 @@ static int comp_disconnect_channel(struct most_interface *iface, int channel_id)
c = get_channel(iface, channel_id);
if (!c)
- return -ENXIO;
+ return -EINVAL;
mutex_lock(&c->io_mutex);
spin_lock(&c->unlink);
@@ -360,7 +360,7 @@ static int comp_rx_completion(struct mbo *mbo)
c = get_channel(mbo->ifp, mbo->hdm_channel_id);
if (!c)
- return -ENXIO;
+ return -EINVAL;
spin_lock(&c->unlink);
if (!c->access_ref || !c->dev) {
@@ -390,7 +390,7 @@ static int comp_tx_completion(struct most_interface *iface, int channel_id)
c = get_channel(iface, channel_id);
if (!c)
- return -ENXIO;
+ return -EINVAL;
if ((channel_id < 0) || (channel_id >= iface->num_channels)) {
dev_warn(c->dev, "Channel ID out of range\n");