summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-19 09:15:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-19 09:15:21 +0200
commit44b0f0836b62171617d56c6528c821ceaa6ea506 (patch)
treea4e7e04989b5f305b22d83c4c7391601cc95fcbb /drivers/usb/serial/usb-serial.c
parentUSB: EHCI: Tegra: Fix wrong register definition (diff)
downloadlinux-44b0f0836b62171617d56c6528c821ceaa6ea506.tar.xz
linux-44b0f0836b62171617d56c6528c821ceaa6ea506.zip
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: Fengguang Wu <fengguang.wu@intel.com> Cc: stable <stable@vger.kernel.org> [3.5] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r--drivers/usb/serial/usb-serial.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 011c520b8e77..483919bbda6f 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -1404,9 +1404,10 @@ 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 */
for (sd = serial_drivers; *sd; ++sd) {
- if ((*sd)->reset_resume)
+ if ((*sd)->reset_resume) {
udriver->reset_resume = usb_serial_reset_resume;
break;
+ }
}
rc = usb_register(udriver);