public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] mmc: correct invalid error checking
       [not found] <20120702175509.10520.24093.stgit@bluebook>
@ 2012-07-02 17:17 ` Chris Ball
  0 siblings, 0 replies; only message in thread
From: Chris Ball @ 2012-07-02 17:17 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-mmc

Hi,

On Mon, Jul 02 2012, Alan Cox wrote:
> From: Alan Cox <alan@linux.intel.com>
>
> 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>
> ---
>
>  drivers/mmc/core/sd.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
> index c272c686..c52f12b 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)
>  	 * 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);

Thanks, pushed to mmc-next for 3.6.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-02 17:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20120702175509.10520.24093.stgit@bluebook>
2012-07-02 17:17 ` [PATCH] mmc: correct invalid error checking Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox