2015-06-30 05:55:44

by Ravi Teja Darbha

[permalink] [raw]
Subject: [PATCH] rts5208:Fix checkpatch warnings

Else condition after if statement is not necessary, hence removed.

Signed-off-by: Ravi Teja Darbha <[email protected]>
---
drivers/staging/rts5208/xd.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rts5208/xd.c b/drivers/staging/rts5208/xd.c
index 10fea7b..42d8d82 100644
--- a/drivers/staging/rts5208/xd.c
+++ b/drivers/staging/rts5208/xd.c
@@ -1689,10 +1689,9 @@ static int xd_read_multiple_pages(struct rtsx_chip *chip, u32 phy_blk,
xd_set_err_code(chip, XD_TO_ERROR);
rtsx_trace(chip);
return STATUS_FAIL;
- } else {
- rtsx_trace(chip);
- goto Fail;
}
+ rtsx_trace(chip);
+ goto Fail;
}

return STATUS_SUCCESS;
@@ -1905,10 +1904,9 @@ static int xd_write_multiple_pages(struct rtsx_chip *chip, u32 old_blk,
xd_set_err_code(chip, XD_TO_ERROR);
rtsx_trace(chip);
return STATUS_FAIL;
- } else {
- rtsx_trace(chip);
- goto Fail;
}
+ rtsx_trace(chip);
+ goto Fail;
}

if (end_page == (xd_card->page_off + 1)) {
--
1.9.1


2015-06-30 06:16:08

by Sudip Mukherjee

[permalink] [raw]
Subject: Re: [PATCH] rts5208:Fix checkpatch warnings

On Tue, Jun 30, 2015 at 11:25:24AM +0530, Ravi Teja Darbha wrote:
> Else condition after if statement is not necessary, hence removed.
else is not necessary after if??? then what it is supposed to be used? :)

I think your commit message should have been:
"else is not necessary after return statement."

regards
sudip