aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/io_ti.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-08-17 18:15:37 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-23 23:50:15 -0400
commit0827a9ff2bbcbb03c33f1a6eb283fe051059482c (patch)
treedb790f7012c7d31d989c884075bd7d1af0f670ba /drivers/usb/serial/io_ti.c
parentd1ab903d2552b2362339b19203c7f01c797cb316 (diff)
USB: io_ti: check firmware version before updating
If we can't read the firmware for a device from the disk, and yet the device already has a valid firmware image in it, we don't want to replace the firmware with something invalid. So check the version number to be less than the current one to verify this is the correct thing to do. Reported-by: Chris Beauchamp <chris@chillibean.tv> Tested-by: Chris Beauchamp <chris@chillibean.tv> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/io_ti.c')
-rw-r--r--drivers/usb/serial/io_ti.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index dc47f986df57..c3f27c316753 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -1151,7 +1151,7 @@ static int download_fw(struct edgeport_serial *serial)
1151 1151
1152 /* Check if we have an old version in the I2C and 1152 /* Check if we have an old version in the I2C and
1153 update if necessary */ 1153 update if necessary */
1154 if (download_cur_ver != download_new_ver) { 1154 if (download_cur_ver < download_new_ver) {
1155 dbg("%s - Update I2C dld from %d.%d to %d.%d", 1155 dbg("%s - Update I2C dld from %d.%d to %d.%d",
1156 __func__, 1156 __func__,
1157 firmware_version->Ver_Major, 1157 firmware_version->Ver_Major,