USB: io_ti: check firmware version before updating
commitfecc5667a9011df2b5f66c148ad4364c3171c832
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Aug 2010 22:15:37 +0000 (17 15:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:41:58 +0000 (26 16:41 -0700)
tree10d74d75a2596adaddba36e01f6dbe81c9bdffa0
parentc913aa09581fdc2ebd9f1cf3dad8aff5b3066f50
USB: io_ti: check firmware version before updating

commit 0827a9ff2bbcbb03c33f1a6eb283fe051059482c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/io_ti.c