lkml.org 
[lkml]   [2011]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging:rts_pstor:Fix SDIO issue
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


\
 
 \ /
  Last update: 2011-10-10 08:17    [W:0.022 / U:0.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site