All of lore.kernel.org
 help / color / mirror / Atom feed
From: hubiaoyong <hubiaoyong@gmail.com>
To: lgirdwood@gmail.com
Cc: broonie@kernel.org, linux-kernel@vger.kernel.org,
	hby2003@163.com, hubiaoyong <hubiaoyong@gmail.com>
Subject: [PATCH] regulator/core.c: remove the else statement
Date: Tue, 18 Apr 2017 23:39:34 +0800	[thread overview]
Message-ID: <1492529974-4332-1-git-send-email-hubiaoyong@gmail.com> (raw)

in the function regulator_ena_gpio_free, the if branch contains
the return statement, so remove the else statement.

Signed-off-by: hubiaoyong <hubiaoyong@gmail.com>
---
 drivers/regulator/core.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 53d4fc7..de3d07a 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2007,9 +2007,8 @@ static void regulator_ena_gpio_free(struct regulator_dev *rdev)
 				kfree(pin);
 				rdev->ena_pin = NULL;
 				return;
-			} else {
-				pin->request_count--;
 			}
+			pin->request_count--;
 		}
 	}
 }
-- 
1.7.1

             reply	other threads:[~2017-04-18 15:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 15:39 hubiaoyong [this message]
2017-04-18 15:49 ` [PATCH] regulator/core.c: remove the else statement Mark Brown
2017-04-18 16:28   ` Joe Perches
     [not found]     ` <CAJPOojYT0Mk-+_Enmtz6C1ZRGDmMcnQLMAOXvGwKAs+bM67tMg@mail.gmail.com>
2017-04-19 16:26       ` Mark Brown

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=1492529974-4332-1-git-send-email-hubiaoyong@gmail.com \
    --to=hubiaoyong@gmail.com \
    --cc=broonie@kernel.org \
    --cc=hby2003@163.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.