[RFC/PATCH] doc2000: Fix uninitialized variable in doc_ecc_decode()

Mark Ware mware at elphinstone.net
Tue Jun 29 02:47:03 EDT 2010


On 29/06/10 16:29, Artem Bityutskiy wrote:
> On Thu, 2010-05-27 at 11:45 +1000, Mark Ware wrote:
>> The variable 'syn' was being used uninitialized.  Also
>> fixed incorrect use of syn[] vs s[].
>>
>> Tested on powerpc board with 64MB DOC2000.
>> ---
>>
>> I am porting from a 2.4.18 kernel to 2.6.32, and I saw random media header
>> mismatches causing a failure to detect the DOC device partitions.  Tracing
>> through, I saw this variable being used uninitialized and I suspect
>> incorrectly also.
>>
>> I do not really understand how the ecc/syndrome code works, so I do not
>> know if this patch is the correct solution, but it did make my problem
>> go away...
>>
>> CC: Thomas Gleixner as I believe he may have written this function initially.
> 
> Please, always add Signed-off-by for kernel patches. I added it for you.
> 

Thanks.  I guess I expected to be told that I was smoking something and that
my DOC error disappearing was unrelated...

Mark



More information about the linux-mtd mailing list