Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Colin Ian King and committed by
Felipe Balbi
5387c920 2938fc63

+2 -6
+2 -6
drivers/usb/gadget/function/f_loopback.c
··· 591 591 592 592 int __init lb_modinit(void) 593 593 { 594 - int ret; 595 - 596 - ret = usb_function_register(&Loopbackusb_func); 597 - if (ret) 598 - return ret; 599 - return ret; 594 + return usb_function_register(&Loopbackusb_func); 600 595 } 596 + 601 597 void __exit lb_modexit(void) 602 598 { 603 599 usb_function_unregister(&Loopbackusb_func);