projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfc6025
)
power: bq24257: Simplify bq24257_power_supply_init()
author
Andreas Dannenberg
<dannenberg@ti.com>
Mon, 28 Sep 2015 22:33:52 +0000
(17:33 -0500)
committer
Sebastian Reichel
<sre@kernel.org>
Tue, 29 Sep 2015 14:48:28 +0000
(16:48 +0200)
Eliminate a few lines of code by using the PTR_ERR_OR_ZERO() macro.
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/bq24257_charger.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/power/bq24257_charger.c
b/drivers/power/bq24257_charger.c
index 6757b41809728704dca173b85b5bd8220be13b23..060f754b41e5596fe33fabd00ab740fb4bbe7678 100644
(file)
--- a/
drivers/power/bq24257_charger.c
+++ b/
drivers/power/bq24257_charger.c
@@
-594,10
+594,7
@@
static int bq24257_power_supply_init(struct bq24257_device *bq)
&bq24257_power_supply_desc,
&psy_cfg);
- if (IS_ERR(bq->charger))
- return PTR_ERR(bq->charger);
-
- return 0;
+ return PTR_ERR_OR_ZERO(bq->charger);
}
static int bq24257_pg_gpio_probe(struct bq24257_device *bq)