mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: wei_wang@realsil.com.cn
Cc: gregkh@suse.de, devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging:rts_pstor:Fix SDIO issue
Date: Mon, 10 Oct 2011 09:12:38 +0300	[thread overview]
Message-ID: <20111010061238.GX18470@longonot.mountain> (raw)
In-Reply-To: <1318211504-22108-1-git-send-email-wei_wang@realsil.com.cn>

On Mon, Oct 10, 2011 at 09:51:44AM +0800, wei_wang@realsil.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

  reply	other threads:[~2011-10-10  6:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-10  1:51 wei_wang
2011-10-10  6:12 ` Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-10-10  6:47 wei_wang
2011-10-10  7:55 ` Dan Carpenter
2011-10-09  2:03 wei_wang
2011-10-09  6:06 ` Dan Carpenter
2011-10-09  6:48   ` wwang
2011-10-09 13:57     ` Dan Carpenter
2011-10-10  1:51       ` wwang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111010061238.GX18470@longonot.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wei_wang@realsil.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®