Skip to content

Commit 5300280

Browse files
committed
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>
1 parent d99bdbb commit 5300280

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/usb/serial/kobil_sct.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ static void kobil_init_termios(struct tty_struct *tty)
178178
static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port)
179179
{
180180
struct device *dev = &port->dev;
181-
int result = 0;
182181
struct kobil_private *priv;
183182
unsigned char *transfer_buffer;
184183
int transfer_buffer_length = 8;
184+
int result;
185185

186186
priv = usb_get_serial_port_data(port);
187187

@@ -272,10 +272,8 @@ static void kobil_write_int_callback(struct urb *urb)
272272
static int kobil_write(struct tty_struct *tty, struct usb_serial_port *port,
273273
const unsigned char *buf, int count)
274274
{
275-
int length = 0;
276-
int result = 0;
277-
int todo = 0;
278275
struct kobil_private *priv;
276+
int length, todo, result;
279277

280278
if (count == 0) {
281279
dev_dbg(&port->dev, "%s - write request of 0 bytes\n", __func__);

0 commit comments

Comments
 (0)