7f7aeea7cf
I get some static checker warnings like this:
drivers/staging/rts5208/ms.c:2607 ms_build_l2p_tbl()
error: buffer underflow 'ms_card->segment' (-1)-16
The problem is that we memset "ms_card" to zero at the start of the
reset_ms_card() function. That means that when we try to calculate
"ms_card->total_block / 512 - 1" then it's just always -1. The fix is
to calculate "seg_no" before doing the memset().
This is a static checker fix, and I am not able to test it. My theory
is that reset_ms_card() gets very little testing which is why this bug
exists.
Fixes:
|
||
---|---|---|
.. | ||
general.c | ||
general.h | ||
Kconfig | ||
Makefile | ||
ms.c | ||
ms.h | ||
rtsx_card.c | ||
rtsx_card.h | ||
rtsx_chip.c | ||
rtsx_chip.h | ||
rtsx_scsi.c | ||
rtsx_scsi.h | ||
rtsx_sys.h | ||
rtsx_transport.c | ||
rtsx_transport.h | ||
rtsx.c | ||
rtsx.h | ||
sd.c | ||
sd.h | ||
spi.c | ||
spi.h | ||
TODO | ||
trace.c | ||
trace.h | ||
xd.c | ||
xd.h |