mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 08:39:52 +00:00
055a2e2ca6
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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Vihas Mak <makvihas@gmail.com> Link: https://lore.kernel.org/r/20220123181734.10402-1-makvihas@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>