mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
staging: rtl8712: usb_intf.c: Fix for possible null pointer dereference
There is otherwise a risk of a possible null pointer dereference. Was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
265b8e5f85
commit
ac082bc52d
1 changed files with 1 additions and 1 deletions
|
@ -595,7 +595,7 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf,
|
||||||
error:
|
error:
|
||||||
usb_put_dev(udev);
|
usb_put_dev(udev);
|
||||||
usb_set_intfdata(pusb_intf, NULL);
|
usb_set_intfdata(pusb_intf, NULL);
|
||||||
if (padapter->dvobj_deinit != NULL)
|
if (padapter && padapter->dvobj_deinit != NULL)
|
||||||
padapter->dvobj_deinit(padapter);
|
padapter->dvobj_deinit(padapter);
|
||||||
if (pnetdev)
|
if (pnetdev)
|
||||||
free_netdev(pnetdev);
|
free_netdev(pnetdev);
|
||||||
|
|
Loading…
Reference in a new issue