aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-07-02 13:55:13 -0400
committerChris Ball <cjb@laptop.org>2012-07-21 00:02:24 -0400
commitb63b5e819d5b21ae493c17c356018ffa98d3ee1c (patch)
tree79565f8d73049e1d66812cf308cd14671c528860 /drivers/mmc
parent68737043bb155b42d54943d25153b901fd16e535 (diff)
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=44061 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index b0b9e372f5da..33c6f26c68d0 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -244,7 +244,7 @@ static int mmc_read_ssr(struct mmc_card *card)
244 * bitfield positions accordingly. 244 * bitfield positions accordingly.
245 */ 245 */
246 au = UNSTUFF_BITS(ssr, 428 - 384, 4); 246 au = UNSTUFF_BITS(ssr, 428 - 384, 4);
247 if (au > 0 || au <= 9) { 247 if (au > 0 && au <= 9) {
248 card->ssr.au = 1 << (au + 4); 248 card->ssr.au = 1 << (au + 4);
249 es = UNSTUFF_BITS(ssr, 408 - 384, 16); 249 es = UNSTUFF_BITS(ssr, 408 - 384, 16);
250 et = UNSTUFF_BITS(ssr, 402 - 384, 6); 250 et = UNSTUFF_BITS(ssr, 402 - 384, 6);