mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
usb: gadget: compress return logic into one line
Simplify return logic and avoid unnecessary variable assignment. Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
5468099c74
commit
0cb5818a3b
1 changed files with 2 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue