[PATCH 09/10] mmc: block: return 0 where evident

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mmc_sd_num_wr_blocks() has this construction:

if (err)
    return err;
if (some_other_stuff_not_touching_err)
    return err;

It follows from logical deduction that we can just return 0
in the latter case.

Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
---
 drivers/mmc/core/block.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 92f7772ca56d..c49c90dba839 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -788,7 +788,7 @@ static int mmc_sd_num_wr_blocks(struct mmc_card *card, u32 *written_blocks)
 	if (err)
 		return err;
 	if (!mmc_host_is_spi(card->host) && !(cmd.resp[0] & R1_APP_CMD))
-		return err;
+		return 0;
 
 	memset(&cmd, 0, sizeof(struct mmc_command));
 
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux