Commit 0cb5818a authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Greg Kroah-Hartman

usb: gadget: compress return logic into one line

Simplify return logic and avoid unnecessary variable assignment.
Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5468099c
...@@ -102,10 +102,8 @@ static int ncm_do_config(struct usb_configuration *c) ...@@ -102,10 +102,8 @@ static int ncm_do_config(struct usb_configuration *c)
} }
f_ncm = usb_get_function(f_ncm_inst); f_ncm = usb_get_function(f_ncm_inst);
if (IS_ERR(f_ncm)) { if (IS_ERR(f_ncm))
status = PTR_ERR(f_ncm); return PTR_ERR(f_ncm);
return status;
}
status = usb_add_function(c, f_ncm); status = usb_add_function(c, f_ncm);
if (status < 0) { if (status < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment