Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1208408
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] regulator: core: Use IS_ERR_OR_NULL() |
| Date | 2015-08-17 09:10 +0200 |
| Message-ID | <pYmIp-6B-11@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Use IS_ERR_OR_NULL() rather than open coding it.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/regulator/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 78387a6cbae5..55b49acfd9b3 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1595,7 +1595,7 @@ static void _regulator_put(struct regulator *regulator)
{
struct regulator_dev *rdev;
- if (regulator == NULL || IS_ERR(regulator))
+ if (IS_ERR_OR_NULL(regulator))
return;
rdev = regulator->rdev;
--
2.4.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] regulator: core: Use IS_ERR_OR_NULL() Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-17 09:10 +0200
Re: [PATCH] regulator: core: Use IS_ERR_OR_NULL() Mark Brown <broonie@kernel.org> - 2015-08-17 22:10 +0200
Re: [PATCH] regulator: core: Use IS_ERR_OR_NULL() Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-18 04:40 +0200
csiph-web