Commit b63b5e81 authored by Alan Cox's avatar Alan Cox Committed by Chris Ball

mmc: core: correct invalid error checking

The effect of the existing code is that we continue blindly when we
should warn about an invalid allocation unit.

Reported-by: dcb314@hotmail.com
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44061Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 68737043
...@@ -244,7 +244,7 @@ static int mmc_read_ssr(struct mmc_card *card) ...@@ -244,7 +244,7 @@ static int mmc_read_ssr(struct mmc_card *card)
* bitfield positions accordingly. * bitfield positions accordingly.
*/ */
au = UNSTUFF_BITS(ssr, 428 - 384, 4); au = UNSTUFF_BITS(ssr, 428 - 384, 4);
if (au > 0 || au <= 9) { if (au > 0 && au <= 9) {
card->ssr.au = 1 << (au + 4); card->ssr.au = 1 << (au + 4);
es = UNSTUFF_BITS(ssr, 408 - 384, 16); es = UNSTUFF_BITS(ssr, 408 - 384, 16);
et = UNSTUFF_BITS(ssr, 402 - 384, 6); et = UNSTUFF_BITS(ssr, 402 - 384, 6);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment