orinoco_usb: potential null dereference
authorDan Carpenter <error27@gmail.com>
Thu, 15 Jul 2010 08:23:10 +0000 (10:23 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 16 Jul 2010 18:03:42 +0000 (14:03 -0400)
commit48d5548fc5e5ad79ca98a287b67f403834929739
tree728303cb63471478d6bb0c0a11ac62b6ed15ec69
parent9171acc7e094b3ca88e624f39891a4f3bf9d083c
orinoco_usb: potential null dereference

Smatch complains that "upriv->read_urb" gets dereferenced before
checking for NULL.  It turns out that it's possible for
"upriv->read_urb" to be NULL so I added checks around the dereferences.

Also I remove an "if (upriv->bap_buf != NULL)" check because
"kfree(NULL) is OK.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/orinoco/orinoco_usb.c