mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
net: enetc: Remove error print for devm_add_action_or_reset()
When `devm_add_action_or_reset()` fails, it is due to a failed memory allocation and will thus return `-ENOMEM`. `dev_err_probe()` doesn't do anything when error is `-ENOMEM`. Therefore, remove the useless call to `dev_err_probe()` when `devm_add_action_or_reset()` fails, and just return the value instead. Signed-off-by: Waqar Hameed <waqar.hameed@axis.com> Reviewed-by: Joe Damato <joe@dama.to> Link: https://patch.msgid.link/pnd1ppghh4p.a.out@axis.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
30f7d4099f
commit
3051f49b0e
|
|
@ -1016,8 +1016,7 @@ static int enetc4_pf_probe(struct pci_dev *pdev,
|
|||
|
||||
err = devm_add_action_or_reset(dev, enetc4_pci_remove, pdev);
|
||||
if (err)
|
||||
return dev_err_probe(dev, err,
|
||||
"Add enetc4_pci_remove() action failed\n");
|
||||
return err;
|
||||
|
||||
/* si is the private data. */
|
||||
si = pci_get_drvdata(pdev);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user