mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 18:13:26 -04:00
net: hibmcge: Remove the use of dev_err_probe()
The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore, remove the useless call to dev_err_probe(), and just return the value instead. Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com> Link: https://patch.msgid.link/20250820085749.397586-2-zhao.xichao@vivo.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
4dba4a936f
commit
ed1e7e2257
@@ -417,7 +417,7 @@ static int hbg_pci_init(struct pci_dev *pdev)
|
||||
|
||||
priv->io_base = pcim_iomap_table(pdev)[0];
|
||||
if (!priv->io_base)
|
||||
return dev_err_probe(dev, -ENOMEM, "failed to get io base\n");
|
||||
return -ENOMEM;
|
||||
|
||||
pci_set_master(pdev);
|
||||
return 0;
|
||||
|
||||
@@ -278,8 +278,7 @@ int hbg_mdio_init(struct hbg_priv *priv)
|
||||
|
||||
mdio_bus = devm_mdiobus_alloc(dev);
|
||||
if (!mdio_bus)
|
||||
return dev_err_probe(dev, -ENOMEM,
|
||||
"failed to alloc MDIO bus\n");
|
||||
return -ENOMEM;
|
||||
|
||||
mdio_bus->parent = dev;
|
||||
mdio_bus->priv = priv;
|
||||
|
||||
Reference in New Issue
Block a user