]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: rtl8712: fix error handling in r871xu_drv_init
authorPavel Skripkin <paskripkin@gmail.com>
Sun, 13 Jun 2021 22:00:13 +0000 (01:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 15:00:22 +0000 (17:00 +0200)
commit601643dca8ee7fe123cda04177dc7eb282c4d970
tree3f3ec4b81c527fdc7a3c1121efb33f8dd3b68529
parent9609b93b30ea8e9adb380d39084ed3dd89f270d6
staging: rtl8712: fix error handling in r871xu_drv_init

[ Upstream commit d1d3e3cdfda8eb91f0e24be7ec8be1e6e01b3a1c ]

Previous error handling path was unique for all
possible errors and there was unnecessary branching.
Also, one step for freeing drv_sw was missing. All
these problems was fixed by restructuring error
handling path.

Also, moved out free_netdev() from r8712_free_drv_sw() for
correct error handling.

Fixes: 2865d42c78a9 ("staging: r8712u: Add the new driver to the mainline kernel")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Link: https://lore.kernel.org/r/febb00f72354449bb4d305f373d6d2f47e539ab4.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/os_intfs.c
drivers/staging/rtl8712/usb_intf.c