diff options
author | Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> | 2014-05-20 23:34:25 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-24 01:58:22 +0900 |
commit | ac082bc52dd197ee7fbc1271f17cea63615b239f (patch) | |
tree | efc2b489ae7feeb914f3d500f2d1d3dedd2cb3bf | |
parent | 265b8e5f85b9537e058f8073d5960d0788b81576 (diff) | |
download | linux-stable-ac082bc52dd197ee7fbc1271f17cea63615b239f.tar.gz linux-stable-ac082bc52dd197ee7fbc1271f17cea63615b239f.tar.bz2 linux-stable-ac082bc52dd197ee7fbc1271f17cea63615b239f.zip |
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>
-rw-r--r-- | drivers/staging/rtl8712/usb_intf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index bbd5888e316b..ba743542babc 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c @@ -595,7 +595,7 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, error: usb_put_dev(udev); usb_set_intfdata(pusb_intf, NULL); - if (padapter->dvobj_deinit != NULL) + if (padapter && padapter->dvobj_deinit != NULL) padapter->dvobj_deinit(padapter); if (pnetdev) free_netdev(pnetdev); |