]> git.baikalelectronics.ru Git - kernel.git/commit
ssb: Fix range check in sprom write
authorMichael Buesch <mb@bu3sch.de>
Mon, 23 Nov 2009 19:58:06 +0000 (20:58 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 23 Nov 2009 22:05:41 +0000 (17:05 -0500)
commit1adc0925d6c45a340be209eed3eba5326f66e686
treee4d1c56fed629085b3387ebc512e8b2a441e393f
parent1cb310bacafc95bdc0e95046951d17c597631b74
ssb: Fix range check in sprom write

The range check in the sprom image parser hex2sprom() is broken.
One sprom word is 4 hex characters.
This fixes the check and also adds much better sanity checks to the code.
We better make sure the image is OK by doing some sanity checks to avoid
bricking the device by accident.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/ssb/sprom.c