mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: [email protected] Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44061 Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Chris Ball <[email protected]>
This commit is contained in:
parent
68737043bb
commit
b63b5e819d
1 changed files with 1 additions and 1 deletions
|
|
@ -244,7 +244,7 @@ static int mmc_read_ssr(struct mmc_card *card)
|
|||
* bitfield positions accordingly.
|
||||
*/
|
||||
au = UNSTUFF_BITS(ssr, 428 - 384, 4);
|
||||
if (au > 0 || au <= 9) {
|
||||
if (au > 0 && au <= 9) {
|
||||
card->ssr.au = 1 << (au + 4);
|
||||
es = UNSTUFF_BITS(ssr, 408 - 384, 16);
|
||||
et = UNSTUFF_BITS(ssr, 402 - 384, 6);
|
||||
|
|
|
|||
Loading…
Reference in a new issue