aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2020-05-27 11:06:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-27 12:26:12 +0200
commit6405fe214229c0ac798ffe5940f53a4cfc3a641f (patch)
tree8bbe9e626a855a46ad926a9fb94a3b3f17fbd476 /drivers
parentstaging: most: usb: move allocation of URB out of critical section (diff)
downloadwireguard-linux-6405fe214229c0ac798ffe5940f53a4cfc3a641f.tar.xz
wireguard-linux-6405fe214229c0ac798ffe5940f53a4cfc3a641f.zip
staging: most: usb: don't use error path to exit function on success
This patch makes it transparent whether the function is exiting with an error or successful. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590570387-27069-7-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/most/usb/usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/most/usb/usb.c b/drivers/staging/most/usb/usb.c
index 534825fc064c..03318def82bd 100644
--- a/drivers/staging/most/usb/usb.c
+++ b/drivers/staging/most/usb/usb.c
@@ -519,13 +519,13 @@ static int hdm_enqueue(struct most_interface *iface, int channel,
"URB submit failed with error %d.\n", retval);
goto err_unanchor_urb;
}
- goto unlock_io_mutex;
+ mutex_unlock(&mdev->io_mutex);
+ return 0;
err_unanchor_urb:
usb_unanchor_urb(urb);
err_free_urb:
usb_free_urb(urb);
-unlock_io_mutex:
mutex_unlock(&mdev->io_mutex);
return retval;
}