summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2025-10-22 17:26:40 +0200
committerJohan Hovold <johan@kernel.org>2025-10-27 09:22:27 +0100
commit53002803832be8cfea1466ce8d568014e9de29d6 (patch)
treefe242fb603690d90070330312367f78c3841b66e
parentd99bdbb0d3e4928dfc5c8dfd017483055ed792c1 (diff)
USB: serial: kobil_sct: drop unnecessary initialisations
Drop unnecessary initialisation of variables that are always assigned before being used. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
-rw-r--r--drivers/usb/serial/kobil_sct.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index cad3cfc63ce7..3a1343d88386 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -178,10 +178,10 @@ static void kobil_init_termios(struct tty_struct *tty)
static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct device *dev = &port->dev;
- int result = 0;
struct kobil_private *priv;
unsigned char *transfer_buffer;
int transfer_buffer_length = 8;
+ int result;
priv = usb_get_serial_port_data(port);
@@ -272,10 +272,8 @@ static void kobil_write_int_callback(struct urb *urb)
static int kobil_write(struct tty_struct *tty, struct usb_serial_port *port,
const unsigned char *buf, int count)
{
- int length = 0;
- int result = 0;
- int todo = 0;
struct kobil_private *priv;
+ int length, todo, result;
if (count == 0) {
dev_dbg(&port->dev, "%s - write request of 0 bytes\n", __func__);