From: Roel Kluin <12o3l@tiscali.nl> Date: Sat, 27 Oct 2007 01:36:37 +0000 (+0200) Subject: USB: free memory when writing fails in usb/serial/mos7840.c X-Git-Tag: v2.6.24-rc4~76^2~19 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7ced46c3ad1dfaaabf9ec6c98cbb0a48e080fb11;p=linux-2.6-omap-h63xx.git 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 --- diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index a5ced7e08cb..c29c9127113 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@ -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);