All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leung Timothy Chi King <contact@timothyleung.co>
To: <gregkh@linuxfoundation.org>, <fabio.falzoi84@gmail.com>,
	<joe@perches.com>, <lambert.quentin@gmail.com>,
	<tinajohnson.1234@gmail.com>
Cc: <contact@timothyleung.co>, <devel@driverdev.osuosl.org>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH] Code cleanup - else is not generally useful after a break or return
Date: Wed, 1 Jul 2015 08:55:21 -0700	[thread overview]
Message-ID: <20150701155521.GA3613@ubuntu> (raw)

Ran checkpatch.pl on driver/staging/rts5208/sd.c and foudn a WARNING
'else is not generally useful after a break or return' on line 3523. I
removed the else without affecting the logic and the WARNING is gone. I
had compiled and modprobe rts5208 to double check as well.

Regards,
Tim

Signed-off-by: Leung Timothy Chi King <contact@timothyleung.co>
---
 drivers/staging/rts5208/sd.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
index a8d657b..cb41579 100644
--- a/drivers/staging/rts5208/sd.c
+++ b/drivers/staging/rts5208/sd.c
@@ -3520,12 +3520,11 @@ int reset_sd_card(struct rtsx_chip *chip)
 			if (chip->sd_io) {
 				rtsx_trace(chip);
 				return STATUS_FAIL;
-			} else {
-				retval = reset_mmc(chip);
-				if (retval != STATUS_SUCCESS) {
-					rtsx_trace(chip);
-					return STATUS_FAIL;
-				}
+			}
+			retval = reset_mmc(chip);
+			if (retval != STATUS_SUCCESS) {
+				rtsx_trace(chip);
+				return STATUS_FAIL;
 			}
 		}
 	}
-- 
1.9.1


             reply	other threads:[~2015-07-01 15:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01 15:55 Leung Timothy Chi King [this message]
2015-07-01 16:07 ` [PATCH] Code cleanup - else is not generally useful after a break or return Greg KH

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=20150701155521.GA3613@ubuntu \
    --to=contact@timothyleung.co \
    --cc=devel@driverdev.osuosl.org \
    --cc=fabio.falzoi84@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=lambert.quentin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tinajohnson.1234@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.