linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator/core.c: remove the else statement
@ 2017-04-18 15:39 hubiaoyong
  2017-04-18 15:49 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: hubiaoyong @ 2017-04-18 15:39 UTC (permalink / raw)
  To: lgirdwood; +Cc: broonie, linux-kernel, hby2003, hubiaoyong

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-19 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 15:39 [PATCH] regulator/core.c: remove the else statement hubiaoyong
2017-04-18 15:49 ` Mark Brown
2017-04-18 16:28   ` Joe Perches
     [not found]     ` <CAJPOojYT0Mk-+_Enmtz6C1ZRGDmMcnQLMAOXvGwKAs+bM67tMg@mail.gmail.com>
2017-04-19 16:26       ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).