]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: free memory when writing fails in usb/serial/mos7840.c
authorRoel Kluin <12o3l@tiscali.nl>
Sat, 27 Oct 2007 01:36:37 +0000 (03:36 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 28 Nov 2007 21:58:33 +0000 (13:58 -0800)
Free buffer when writing ZLP_REG5 failed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/mos7840.c

index a5ced7e08cbfc05ca9417b8dd42fd61c624ed27c..c29c91271133584bdc9369f40c3cfd1817ac154a 100644 (file)
@@ -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);