Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: legousbtower.c: remove a bogus NULL check

"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>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
644034c2 4d9e4088

-3
-3
drivers/usb/misc/legousbtower.c
··· 868 868 869 869 dbg(2, "%s: enter", __func__); 870 870 871 - if (udev == NULL) 872 - dev_info(&interface->dev, "udev is NULL.\n"); 873 - 874 871 /* allocate memory for our device state and initialize it */ 875 872 876 873 dev = kmalloc (sizeof(struct lego_usb_tower), GFP_KERNEL);