]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: rtl8712: remove redundant check in r871xu_drv_init
authorPavel Skripkin <paskripkin@gmail.com>
Sun, 13 Jun 2021 22:00:07 +0000 (01:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:53:44 +0000 (16:53 +0200)
[ Upstream commit 69d998f1e552f6e2e7b55f5058ce1ac7a72903f9 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/rtl8712/usb_intf.c

index 2fcd65260f4c18b1f9e2465aed024738a61acfc7..bc421925e84c203441033fc881ccf8c26d44ffd7 100644 (file)
@@ -380,13 +380,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)