Commit 44b0f083 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: serial: fix up bug with missing {}

As reported by Fengguang:

FYI, coccinelle warns about

drivers/usb/serial/usb-serial.c:1415:3-51: code aligned with following code on line 1416

vim +1415 drivers/usb/serial/usb-serial.c

  1412          /* we only set the reset_resume field if the serial_driver has one */
  1413          for (sd = serial_drivers; *sd; ++sd) {
  1414                  if ((*sd)->reset_resume)
> 1415                          udriver->reset_resume = usb_serial_reset_resume;
> 1416                          break;
  1417          }
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Cc: stable <stable@vger.kernel.org> [3.5]
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 45c2da62
...@@ -1404,10 +1404,11 @@ int usb_serial_register_drivers(struct usb_serial_driver *const serial_drivers[] ...@@ -1404,10 +1404,11 @@ int usb_serial_register_drivers(struct usb_serial_driver *const serial_drivers[]
/* we only set the reset_resume field if the serial_driver has one */ /* we only set the reset_resume field if the serial_driver has one */
for (sd = serial_drivers; *sd; ++sd) { for (sd = serial_drivers; *sd; ++sd) {
if ((*sd)->reset_resume) if ((*sd)->reset_resume) {
udriver->reset_resume = usb_serial_reset_resume; udriver->reset_resume = usb_serial_reset_resume;
break; break;
} }
}
rc = usb_register(udriver); rc = usb_register(udriver);
if (rc) if (rc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment