summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/function/f_loopback.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-09-08 21:09:30 +0100
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-09-09 13:38:37 +0300
commit5387c920372a3aaeb97b8b4721619ca9ff2a82ab (patch)
tree949b40d3a47fb8af00dd7b386c27ab32a6e7a399 /drivers/usb/gadget/function/f_loopback.c
parent2938fc63e0c26bf694436ac81bc776c8b7eced0c (diff)
downloadlinux-5387c920372a3aaeb97b8b4721619ca9ff2a82ab.tar.bz2
usb: gadget: remove variable ret and remove unnecessary if statement
the if statement in lb_modinit is unnecessary so we can totally remove the variable ret and just return the return value from the call to usb_function_register. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/function/f_loopback.c')
-rw-r--r--drivers/usb/gadget/function/f_loopback.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/gadget/function/f_loopback.c b/drivers/usb/gadget/function/f_loopback.c
index ddb8c896eaa3..e70093835e14 100644
--- a/drivers/usb/gadget/function/f_loopback.c
+++ b/drivers/usb/gadget/function/f_loopback.c
@@ -591,13 +591,9 @@ DECLARE_USB_FUNCTION(Loopback, loopback_alloc_instance, loopback_alloc);
int __init lb_modinit(void)
{
- int ret;
-
- ret = usb_function_register(&Loopbackusb_func);
- if (ret)
- return ret;
- return ret;
+ return usb_function_register(&Loopbackusb_func);
}
+
void __exit lb_modexit(void)
{
usb_function_unregister(&Loopbackusb_func);