Skip to contentSkip to conversation

staging/rts_pstor: fix the no brace needed warning

PATCH New Devendra Naga 1 participant 1 message Jul 7, 2012 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging/rts_pstor: fix the no brace needed warning

for if else statements having single block no braces are needed fixed the following checkpatch warning

drivers/staging/rts_pstor/sd.c:140: WARNING: braces {} are not necessary for any arm of this statement

---
 drivers/staging/rts_pstor/sd.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/rts_pstor/sd.c +2 -3
index b9474a8..ff9bf0f 100644
@@ -137,11 +137,10 @@ static int sd_check_data0_status(struct rtsx_chip *chip)
 {
 	u8 stat;
 
-	if (CHECK_PID(chip, 0x5209)) {
+	if (CHECK_PID(chip, 0x5209))
 		RTSX_READ_REG(chip, REG_SD_BUS_STAT, &stat);
-	} else {
+	else
 		RTSX_READ_REG(chip, REG_SD_STAT1, &stat);
-	}
 
 	if (!(stat & SD_DAT0_STATUS)) {
 		sd_set_err_code(chip, SD_BUSY);
Signature · 1 line
1.7.9.5