]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita2b144db99481d10a3e813489509d63d299cd536
tree728303cb63471478d6bb0c0a11ac62b6ed15ec69
parent69fe8e9da89e163c34032c1470501cb8bb9dbb7a
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