Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1625410

[PATCH] regulator/core.c: remove the else statement

From hubiaoyong <hubiaoyong@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] regulator/core.c: remove the else statement
Date 2017-04-18 17:50 +0200
Message-ID <txDya-7Sz-15@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View 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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] regulator/core.c: remove the else statement hubiaoyong <hubiaoyong@gmail.com> - 2017-04-18 17:50 +0200
  Re: [PATCH] regulator/core.c: remove the else statement Mark Brown <broonie@kernel.org> - 2017-04-18 18:00 +0200
    Re: [PATCH] regulator/core.c: remove the else statement Joe Perches <joe@perches.com> - 2017-04-18 18:30 +0200
      Re: [PATCH] regulator/core.c: remove the else statement Mark Brown <broonie@kernel.org> - 2017-04-19 18:30 +0200

csiph-web