]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
USB: gadgetfs: remove unnecessary assignment
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 9 Dec 2016 20:25:15 +0000 (15:25 -0500)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 2 Jan 2017 08:55:28 +0000 (10:55 +0200)
The dev_config() routine in gadgetfs has a check that
dev->dev->bNumConfigurations is equal to 1, and then contains a
redundant line of code setting the value to 1.  This patch removes the
unnecessary assignment.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/legacy/inode.c

index 08e5ecc050795cceb35e40cb44016221abdb140f..6bde4396927c997b686419cbc4fb15997b0e304f 100644 (file)
@@ -1818,7 +1818,6 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
                        || dev->dev->bDescriptorType != USB_DT_DEVICE
                        || dev->dev->bNumConfigurations != 1)
                goto fail;
-       dev->dev->bNumConfigurations = 1;
        dev->dev->bcdUSB = cpu_to_le16 (0x0200);
 
        /* triggers gadgetfs_bind(); then we can enumerate. */