Skip to content

Commit

Permalink
power: supply: rt9467: Fix passing zero to 'dev_err_probe'
Browse files Browse the repository at this point in the history
Fix passing zero to 'dev_err_probe()' in 'rt9467_request_interrupt()'

Fixes: 6f7f70e ("power: supply: rt9467: Add Richtek RT9467 charger driver")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/202305111228.bHLWU6bq-lkp@intel.com/
Signed-off-by: ChiaEn Wu <chiaen_wu@richtek.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
  • Loading branch information
ChiaEn Wu authored and Sebastian Reichel committed May 14, 2023
1 parent 155c45a commit bc97139
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/supply/rt9467-charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ static int rt9467_request_interrupt(struct rt9467_chg_data *data)
for (i = 0; i < num_chg_irqs; i++) {
virq = regmap_irq_get_virq(data->irq_chip_data, chg_irqs[i].hwirq);
if (virq <= 0)
return dev_err_probe(dev, virq, "Failed to get (%s) irq\n",
return dev_err_probe(dev, -EINVAL, "Failed to get (%s) irq\n",
chg_irqs[i].name);

ret = devm_request_threaded_irq(dev, virq, NULL, chg_irqs[i].handler,
Expand Down

0 comments on commit bc97139

Please sign in to comment.