mirror of
https://github.com/torvalds/linux.git
synced 2025-01-01 15:51:46 +00:00
power: supply: Remove redundant dev_err_probe() for platform_get_irq_byname()
There is no need to call the dev_err_probe() function directly to print a custom message when handling an error from platform_get_irq_byname() function as it is going to display an appropriate error message in case of a failure. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Link: https://lore.kernel.org/r/20230727113550.2599335-1-ruanjinjie@huawei.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
parent
6eca10a1c2
commit
389405146c
@ -849,9 +849,7 @@ static int mt6370_chg_init_irq(struct mt6370_priv *priv)
|
|||||||
ret = platform_get_irq_byname(to_platform_device(priv->dev),
|
ret = platform_get_irq_byname(to_platform_device(priv->dev),
|
||||||
mt6370_chg_irqs[i].name);
|
mt6370_chg_irqs[i].name);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return dev_err_probe(priv->dev, ret,
|
return ret;
|
||||||
"Failed to get irq %s\n",
|
|
||||||
mt6370_chg_irqs[i].name);
|
|
||||||
|
|
||||||
priv->irq_nums[i] = ret;
|
priv->irq_nums[i] = ret;
|
||||||
ret = devm_request_threaded_irq(priv->dev, ret, NULL,
|
ret = devm_request_threaded_irq(priv->dev, ret, NULL,
|
||||||
|
@ -915,8 +915,7 @@ static int smb2_init_irq(struct smb2_chip *chip, int *irq, const char *name,
|
|||||||
|
|
||||||
irqnum = platform_get_irq_byname(to_platform_device(chip->dev), name);
|
irqnum = platform_get_irq_byname(to_platform_device(chip->dev), name);
|
||||||
if (irqnum < 0)
|
if (irqnum < 0)
|
||||||
return dev_err_probe(chip->dev, irqnum,
|
return irqnum;
|
||||||
"Couldn't get irq %s byname\n", name);
|
|
||||||
|
|
||||||
rc = devm_request_threaded_irq(chip->dev, irqnum, NULL, handler,
|
rc = devm_request_threaded_irq(chip->dev, irqnum, NULL, handler,
|
||||||
IRQF_ONESHOT, name, chip);
|
IRQF_ONESHOT, name, chip);
|
||||||
|
Loading…
Reference in New Issue
Block a user