mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
mmc: sdio: Fix potential NULL pointer error in mmc_sdio_init_card()
commitf04086c225upstream. During some scenarios mmc_sdio_init_card() runs a retry path for the UHS-I specific initialization, which leads to removal of the previously allocated card. A new card is then re-allocated while retrying. However, in one of the corresponding error paths we may end up to remove an already removed card, which likely leads to a NULL pointer exception. So, let's fix this. Fixes:5fc3d80ef4("mmc: sdio: don't use rocr to check if the card could support UHS mode") Cc: <stable@vger.kernel.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://lore.kernel.org/r/20200430091640.455-2-ulf.hansson@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d3c4c5a4d3
commit
55d805ab36
@@ -718,9 +718,8 @@ try_again:
|
||||
/* Retry init sequence, but without R4_18V_PRESENT. */
|
||||
retries = 0;
|
||||
goto try_again;
|
||||
} else {
|
||||
goto remove;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user