From: Greg Kroah-Hartman Date: Wed, 19 Sep 2012 07:15:21 +0000 (+0100) Subject: USB: serial: fix up bug with missing {} X-Git-Tag: v3.5.6~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c83c0144d726f063c76b427fa67a1eb66f616777;p=thirdparty%2Fkernel%2Fstable.git USB: serial: fix up bug with missing {} commit 44b0f0836b62171617d56c6528c821ceaa6ea506 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 27483f91a4a38..667c39cbbe979 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -1426,9 +1426,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);