target: usb-gadget: cleanup duplicate initialization
Subsystems (2)
PATCH 2/2 target: usb-gadget: cleanup duplicate initialization
Sparse points out that we initialize .bAlternateSetting twice. But fortunately USB_G_ALT_INT_BBB is zero so we initialize it to the same value both times.
Signed-off-by Dan Carpenter <[email protected]>
drivers/target/usb-gadget/usb_gadget.c +0 -1
@@ -1977,7 +1977,6 @@ static void usbg_deregister_configfs(void)static struct usb_interface_descriptor bot_intf_desc = { .bLength =sizeof (bot_intf_desc), .bDescriptorType =USB_DT_INTERFACE , - .bAlternateSetting =0 , .bNumEndpoints =2 , .bAlternateSetting =USB_G_ALT_INT_BBB , .bInterfaceClass =USB_CLASS_MASS_STORAGE ,
Nicholas A. Bellinger
AppliedQuoted 11 lines · Dan Carpenter
Sparse points out that we initialize .bAlternateSetting twice. But fortunately
USB_G_ALT_INT_BBBis zero so we initialize it to the same value both times.Signed-off-by Dan Carpenter <[email protected]>drivers/target/usb-gadget/usb_gadget.c +0
-0
drivers/target/usb-gadget/usb_gadget.c static void usbg_deregister_configfs(void)
Quoted 8 lines
drivers/target/usb-gadget/usb_gadget.c +0
-2@@ -1977,7 +1977,6 @@ static void usbg_deregister_configfs(void)static struct usb_interface_descriptor bot_intf_desc = { .bLength =sizeof (bot_intf_desc), .bDescriptorType =USB_DT_INTERFACE , - .bAlternateSetting =0 , .bNumEndpoints =2 , .bAlternateSetting =USB_G_ALT_INT_BBB , .bInterfaceClass =USB_CLASS_MASS_STORAGE , --
Applied. Thanks DanC!
--nab