USB: serial: io_ti.c: don't return 0 if writing the download record failed
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 10 Aug 2010 21:29:19 +0000 (14:29 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 24 Aug 2010 03:50:16 +0000 (20:50 -0700)
If the write download record failed we shouldn't return 0.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/io_ti.c

index c3f27c31675392e51ea4a71259845ccc424fb6b9..a7cfc59529377b16f084e6bd6e2bf118d4cc9cb5 100644 (file)
@@ -1284,7 +1284,7 @@ static int download_fw(struct edgeport_serial *serial)
                                kfree(header);
                                kfree(rom_desc);
                                kfree(ti_manuf_desc);
-                               return status;
+                               return -EINVAL;
                        }
 
                        /* Update I2C with type 0xf2 record with correct