Skip to content

Commit

Permalink
USB: legousbtower.c: remove a bogus NULL check
Browse files Browse the repository at this point in the history
"udev" can't be NULL here.  The debugging printk() makes static checkers
complain when we dereference it later in the function inside the call to
usb_rcvctrlpipe().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Aug 15, 2012
1 parent 4d9e408 commit 644034c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/usb/misc/legousbtower.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,9 +868,6 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device

dbg(2, "%s: enter", __func__);

if (udev == NULL)
dev_info(&interface->dev, "udev is NULL.\n");

/* allocate memory for our device state and initialize it */

dev = kmalloc (sizeof(struct lego_usb_tower), GFP_KERNEL);
Expand Down

0 comments on commit 644034c

Please sign in to comment.