[PATCH 1/6] mmc: mmc_spi: correct the while condition
bmeng.cn at gmail.com
Wed Jul 8 07:21:48 CEST 2020
On Mon, Jun 29, 2020 at 5:48 PM Pragnesh Patel
<pragnesh.patel at sifive.com> wrote:
> When variable i will become 0, while(i--) loop breaks but variable i will
> again decrement to -1 because of i-- and that's why below condition
> "if (!i && (r != resp_match_value)" will never execute, So doing "i--"
> inside of while() loop solves this problem.
> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com>
> Reviewed-by: Bin Meng <bin.meng at windriver.com>
> drivers/mmc/mmc_spi.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Tested-by: Bin Meng <bin.meng at windriver.com>
More information about the U-Boot