Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Waqar Hameed and committed by
Jakub Kicinski
3051f49b 30f7d409

+1 -2
+1 -2
drivers/net/ethernet/freescale/enetc/enetc4_pf.c
··· 1016 1016 1017 1017 err = devm_add_action_or_reset(dev, enetc4_pci_remove, pdev); 1018 1018 if (err) 1019 - return dev_err_probe(dev, err, 1020 - "Add enetc4_pci_remove() action failed\n"); 1019 + return err; 1021 1020 1022 1021 /* si is the private data. */ 1023 1022 si = pci_get_drvdata(pdev);