Message ID | 1443196460-26156-6-git-send-email-dannenberg@ti.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
W dniu 26.09.2015 o 00:54, Andreas Dannenberg pisze: > Eliminate a few lines of code by using the PTR_ERR_OR_ZERO() macro. > > Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> > --- > drivers/power/bq24257_charger.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/power/bq24257_charger.c b/drivers/power/bq24257_charger.c index 6757b41..060f754 100644 --- 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)
Eliminate a few lines of code by using the PTR_ERR_OR_ZERO() macro. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> --- drivers/power/bq24257_charger.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)