Skip to content

Commit

Permalink
staging: rtl8712: remove redundant check in r871xu_drv_init
Browse files Browse the repository at this point in the history
padapter->dvobj_init is initialized rigth before
initialization check. There is no need for any
branching here.

Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Link: https://lore.kernel.org/r/d367e5f39f22af44c545f8710cc18fb00f10e66c.1623620630.git.paskripkin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Pavel Skripkin authored and Greg Kroah-Hartman committed Jun 14, 2021
1 parent 64ed82a commit 69d998f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/staging/rtl8712/usb_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,11 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf,
/* step 3.
* initialize the dvobj_priv
*/
if (!padapter->dvobj_init) {

status = padapter->dvobj_init(padapter);
if (status != _SUCCESS)
goto error;
} else {
status = padapter->dvobj_init(padapter);
if (status != _SUCCESS)
goto error;
}

/* step 4. */
status = r8712_init_drv_sw(padapter);
if (status)
Expand Down

0 comments on commit 69d998f

Please sign in to comment.