Skip to content
Commit 055a2e2c authored by Vihas Mak's avatar Vihas Mak Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: handle rtw_init_netdev_name() failure appropriately



rtw_init_netdev_name() calls dev_alloc_name() which allocates the name
for the device as per the given name format.
The name format is specified by the module parameter "ifname".
It returns a negative err code if the format is invalid. Handle this
error appropriately.
Cancel the timers ininitliazed by rtw_init_drv_sw() before calling
rtw_free_drv_sw() and then proceed to free the adapter.

Also, if register_netdev() fails then goto free_drv_sw instead of
goto handle_dualmac.

Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarVihas Mak <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220123181734.10402-1-makvihas@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6cc2d1a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment