Re: [PATCH 5/5] power: Use %pe to print error pointers symbolically

From: Krzysztof Kozlowski

Date: Sun Sep 06 2026 - 02:30:46 EST


On 06/09/2026 08:17, Sumeet Pawnikar wrote:
> }
> diff --git a/drivers/power/supply/cw2015_battery.c b/drivers/power/supply/cw2015_battery.c
> index 1bcb60cf763d..48643f7bf503 100644
> --- a/drivers/power/supply/cw2015_battery.c
> +++ b/drivers/power/supply/cw2015_battery.c
> @@ -658,8 +658,8 @@ static int cw_bat_probe(struct i2c_client *client)
>
> cw_bat->regmap = devm_regmap_init_i2c(client, &cw2015_regmap_config);
> if (IS_ERR(cw_bat->regmap)) {
> - dev_err(cw_bat->dev, "Failed to allocate regmap: %ld\n",
> - PTR_ERR(cw_bat->regmap));
> + dev_err(cw_bat->dev, "Failed to allocate regmap: %pe\n",
> + cw_bat->regmap);
> return PTR_ERR(cw_bat->regmap);

return dev_err_probe

Instead you should use dev_err_probe and drop the last argument.

Best regards,
Krzysztof