Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Roel Kluin and committed by
Greg Kroah-Hartman
7ced46c3 2e2c5eea

+1 -1
+1 -1
drivers/usb/serial/mos7840.c
··· 2711 2711 status = mos7840_set_reg_sync(serial->port[0], ZLP_REG5, Data); 2712 2712 if (status < 0) { 2713 2713 dbg("Writing ZLP_REG5 failed status-0x%x\n", status); 2714 - return -1; 2714 + goto error; 2715 2715 } else 2716 2716 dbg("ZLP_REG5 Writing success status%d\n", status); 2717 2717