Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b84b8ef authored by Andreas Dannenberg's avatar Andreas Dannenberg Committed by Sebastian Reichel
Browse files

power: bq24257: Simplify bq24257_power_supply_init()



Eliminate a few lines of code by using the PTR_ERR_OR_ZERO() macro.

Signed-off-by: default avatarAndreas Dannenberg <dannenberg@ti.com>
Reviewed-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent dfc60252
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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)