Commit 7b11eb3e authored by Devendra Naga's avatar Devendra Naga Committed by Greg Kroah-Hartman

staging: serqt_usb2: remove retval initialisation in qt_tiocmget and qt_tiocmset

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: default avatarDevendra Naga <develkernel412222@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 68e071d8
...@@ -1412,7 +1412,7 @@ static int qt_tiocmget(struct tty_struct *tty) ...@@ -1412,7 +1412,7 @@ static int qt_tiocmget(struct tty_struct *tty)
struct usb_serial_port *port = tty->driver_data; struct usb_serial_port *port = tty->driver_data;
struct usb_serial *serial = get_usb_serial(port, __func__); struct usb_serial *serial = get_usb_serial(port, __func__);
struct quatech_port *qt_port = qt_get_port_private(port); struct quatech_port *qt_port = qt_get_port_private(port);
int retval = -ENODEV; int retval;
if (!serial) if (!serial)
return -ENODEV; return -ENODEV;
...@@ -1430,7 +1430,7 @@ static int qt_tiocmset(struct tty_struct *tty, ...@@ -1430,7 +1430,7 @@ static int qt_tiocmset(struct tty_struct *tty,
struct usb_serial_port *port = tty->driver_data; struct usb_serial_port *port = tty->driver_data;
struct usb_serial *serial = get_usb_serial(port, __func__); struct usb_serial *serial = get_usb_serial(port, __func__);
struct quatech_port *qt_port = qt_get_port_private(port); struct quatech_port *qt_port = qt_get_port_private(port);
int retval = -ENODEV; int retval;
if (!serial) if (!serial)
return -ENODEV; return -ENODEV;
......
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