staging: serqt_usb2: remove retval initialisation in qt_tiocmget and qt_tiocmset
authorDevendra Naga <develkernel412222@gmail.com>
Wed, 15 Aug 2012 09:11:03 +0000 (14:56 +0545)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2012 22:32:13 +0000 (15:32 -0700)
in qt_tiocmset,

the retval gets assigned if we have a valid serial pointer in the critical section
(between mutex_lock and _unlock) of the code, no need to initialise this variable.

the same retval assignment follows in the qt_tiocmget function also, so remove the
initialisation here too.

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/serqt_usb2/serqt_usb2.c

index 135eb3896b39d86f6229cc857188d4cec5a124b4..5a5ea482a2163f31820b12ba0ff07c12bd8ced4f 100644 (file)
@@ -1412,7 +1412,7 @@ static int qt_tiocmget(struct tty_struct *tty)
        struct usb_serial_port *port = tty->driver_data;
        struct usb_serial *serial = get_usb_serial(port, __func__);
        struct quatech_port *qt_port = qt_get_port_private(port);
-       int retval = -ENODEV;
+       int retval;
 
        if (!serial)
                return -ENODEV;
@@ -1430,7 +1430,7 @@ static int qt_tiocmset(struct tty_struct *tty,
        struct usb_serial_port *port = tty->driver_data;
        struct usb_serial *serial = get_usb_serial(port, __func__);
        struct quatech_port *qt_port = qt_get_port_private(port);
-       int retval = -ENODEV;
+       int retval;
 
        if (!serial)
                return -ENODEV;