Skip to content

Commit 7ced46c

Browse files
Roel Kluingregkh
authored andcommitted
USB: free memory when writing fails in usb/serial/mos7840.c
Free buffer when writing ZLP_REG5 failed Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent 2e2c5ee commit 7ced46c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/usb/serial/mos7840.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2711,7 +2711,7 @@ static int mos7840_startup(struct usb_serial *serial)
27112711
status = mos7840_set_reg_sync(serial->port[0], ZLP_REG5, Data);
27122712
if (status < 0) {
27132713
dbg("Writing ZLP_REG5 failed status-0x%x\n", status);
2714-
return -1;
2714+
goto error;
27152715
} else
27162716
dbg("ZLP_REG5 Writing success status%d\n", status);
27172717

0 commit comments

Comments
 (0)