1
0
Fork 0

power: bq24257: Simplify bq24257_power_supply_init()

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>
hifive-unleashed-5.1
Andreas Dannenberg 2015-09-28 17:33:52 -05:00 committed by Sebastian Reichel
parent dfc602524b
commit 3b84b8efef
1 changed files with 1 additions and 4 deletions

View File

@ -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)