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:
Xichao Zhao
2025-08-20 16:57:48 +08:00
committed by Jakub Kicinski
parent 4dba4a936f
commit ed1e7e2257
2 changed files with 2 additions and 3 deletions

View File

@@ -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;

View File

@@ -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;