summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/legacy/ncm.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2018-01-18 16:25:51 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-22 15:34:37 +0100
commit0cb5818a3b250de64e02592f4584f7c21d9566b8 (patch)
treea8bfb6ab7a0a1d07fded353c42d18122df3ea18f /drivers/usb/gadget/legacy/ncm.c
parent5468099c747240ed97dbb34340fece8ca87be34f (diff)
downloadlinux-0cb5818a3b250de64e02592f4584f7c21d9566b8.tar.bz2
usb: gadget: compress return logic into one line
Simplify return logic and avoid unnecessary variable assignment. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/legacy/ncm.c')
-rw-r--r--drivers/usb/gadget/legacy/ncm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/gadget/legacy/ncm.c b/drivers/usb/gadget/legacy/ncm.c
index fcee1ee0bf66..8465f081e921 100644
--- a/drivers/usb/gadget/legacy/ncm.c
+++ b/drivers/usb/gadget/legacy/ncm.c
@@ -102,10 +102,8 @@ static int ncm_do_config(struct usb_configuration *c)
}
f_ncm = usb_get_function(f_ncm_inst);
- if (IS_ERR(f_ncm)) {
- status = PTR_ERR(f_ncm);
- return status;
- }
+ if (IS_ERR(f_ncm))
+ return PTR_ERR(f_ncm);
status = usb_add_function(c, f_ncm);
if (status < 0) {