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: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>
Loading
Please sign in to comment