diff options
author | kbuild test robot <lkp@intel.com> | 2019-07-24 17:22:36 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-07-25 17:44:11 +0100 |
commit | 1889c6e6ac6e15b3631d7e320f740219aa46504a (patch) | |
tree | d335453a6e4a401f177de772ed306f1c3639ec30 /drivers/regulator | |
parent | a5f888c53db575e3b04e7b4597699da67b9cd2eb (diff) | |
download | linux-1889c6e6ac6e15b3631d7e320f740219aa46504a.tar.bz2 |
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: 2d09a79bf637 ("regulator: act8865: Add support for act8600 charger")
CC: Maarten ter Huurne <maarten@treewalker.org>
Signed-off-by: kbuild test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20190724092236.witxtfmubun25l2t@1905cc33b6dd
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/act8865-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c index b515e0785d67..6a90d3c7a452 100644 --- a/drivers/regulator/act8865-regulator.c +++ b/drivers/regulator/act8865-regulator.c @@ -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, |