lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 10 Oct 2011 09:12:38 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	wei_wang@...lsil.com.cn
Cc:	gregkh@...e.de, devel@...uxdriverproject.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging:rts_pstor:Fix SDIO issue

On Mon, Oct 10, 2011 at 09:51:44AM +0800, wei_wang@...lsil.com.cn wrote:
> @@ -3157,17 +3158,16 @@ int reset_sd_card(struct rtsx_chip *chip)
>  				if (retval != STATUS_SUCCESS) {
>  					TRACE_RET(chip, STATUS_FAIL);
>  				}
> +				retval = STATUS_FAIL;
>  			}
>  
> -			if (!chip->sd_io) {
> +			if (!chip->sd_io)
>  				retval = reset_mmc(chip);
> -			}

+ 			if (retval != STATUS_SUCCESS) 
+				TRACE_RET(chip, STATUS_FAIL);

>  		}
>  	}
>  
> -	if (retval != STATUS_SUCCESS) {
> +	if (retval != STATUS_SUCCESS)
>  		TRACE_RET(chip, STATUS_FAIL);
> -	}

Then you can remove this check.  It's better to have the checks for
failure as soon after the function call as possible.

>  
>  	retval = sd_set_clock_divider(chip, SD_CLK_DIVIDE_0);
>  	if (retval != STATUS_SUCCESS) {

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ