Verified Commit 1889c6e6 authored by kbuild test robot's avatar kbuild test robot Committed by Mark Brown
Browse files

regulator: act8865: fix ptr_ret.cocci warnings

drivers/regulator/act8865-regulator.c:447:8-14: WARNING: PTR_ERR_OR_ZERO can be used

 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 2d09a79b

 ("regulator: act8865: Add support for act8600 charger")
CC: Maarten ter Huurne <>
Signed-off-by: default avatarkbuild test robot <>

Signed-off-by: Mark Brown's avatarMark Brown <>
parent a5f888c5
......@@ -465,7 +465,7 @@ static int act8600_charger_probe(struct device *dev, struct regmap *regmap)
charger = devm_power_supply_register(dev, &act8600_charger_desc, &cfg);
return IS_ERR(charger) ? PTR_ERR(charger) : 0;
return PTR_ERR_OR_ZERO(charger);
static int act8865_pmic_probe(struct i2c_client *client,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment