On Fri, Jun 20, 2014 at 09:31:28AM -0700, Vincent Heuken wrote:
> This is a patch to the serqt_usb2.c file that fixes two instances
> of the following checkpatch.pl warning:
> WARNING: else is not generally useful after a break or return
> 
> Signed-off-by: Vincent Heuken <m...@vincentheuken.com>
> ---
>  drivers/staging/serqt_usb2/serqt_usb2.c | 47 
> +++++++++++++++++----------------
>  1 file changed, 24 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c 
> b/drivers/staging/serqt_usb2/serqt_usb2.c
> index 998c384..98e9736 100644
> --- a/drivers/staging/serqt_usb2/serqt_usb2.c
> +++ b/drivers/staging/serqt_usb2/serqt_usb2.c
> @@ -981,9 +981,8 @@ static void qt_block_until_empty(struct tty_struct *tty,
>               if (wait == 0) {
>                       dev_dbg(&qt_port->port->dev, "%s - TIMEOUT", __func__);
>                       return;
> -             } else {
> -                     wait = 30;
>               }
> +             wait = 30;
>       }
>  }
>  
> @@ -1130,27 +1129,29 @@ static int qt_ioctl(struct tty_struct *tty,
>                       /* this never wakes up */
>                       interruptible_sleep_on(&qt_port->msr_wait);
>  #endif
> +
> +                     char diff;

A variable definition should be at the beginning of the function, not in
the middle.

thanks,

greg k-h
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to