Skip to content

Commit

Permalink
USB: free memory when writing fails in usb/serial/mos7840.c
Browse files Browse the repository at this point in the history
Free buffer when writing ZLP_REG5 failed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Roel Kluin authored and Greg Kroah-Hartman committed Nov 28, 2007
1 parent 2e2c5ee commit 7ced46c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/serial/mos7840.c
Original file line number Diff line number Diff line change
Expand Up @@ -2711,7 +2711,7 @@ static int mos7840_startup(struct usb_serial *serial)
status = mos7840_set_reg_sync(serial->port[0], ZLP_REG5, Data);
if (status < 0) {
dbg("Writing ZLP_REG5 failed status-0x%x\n", status);
return -1;
goto error;
} else
dbg("ZLP_REG5 Writing success status%d\n", status);

Expand Down

0 comments on commit 7ced46c

Please sign in to comment.