提交 3b84b8ef 编写于 作者: A Andreas Dannenberg 提交者: Sebastian Reichel

power: bq24257: Simplify bq24257_power_supply_init()

Eliminate a few lines of code by using the PTR_ERR_OR_ZERO() macro.
Signed-off-by: NAndreas Dannenberg <dannenberg@ti.com>
Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: NSebastian Reichel <sre@kernel.org>
上级 dfc60252
...@@ -594,10 +594,7 @@ static int bq24257_power_supply_init(struct bq24257_device *bq) ...@@ -594,10 +594,7 @@ static int bq24257_power_supply_init(struct bq24257_device *bq)
&bq24257_power_supply_desc, &bq24257_power_supply_desc,
&psy_cfg); &psy_cfg);
if (IS_ERR(bq->charger)) return PTR_ERR_OR_ZERO(bq->charger);
return PTR_ERR(bq->charger);
return 0;
} }
static int bq24257_pg_gpio_probe(struct bq24257_device *bq) static int bq24257_pg_gpio_probe(struct bq24257_device *bq)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册