Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0c6ce24 authored by Fabio Estevam's avatar Fabio Estevam Committed by David S. Miller
Browse files

net: fec: Remove unneeded use of IS_ERR_VALUE() macro



There is no need to use the IS_ERR_VALUE() macro for checking
the return value from pm_runtime_* functions.

Just do a simple negative test instead.

The semantic patch that makes this change is available
in scripts/coccinelle/api/pm_runtime.cocci.

Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 140d8b33
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1779,7 +1779,7 @@ static int fec_enet_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
	int ret = 0;

	ret = pm_runtime_get_sync(dev);
	if (IS_ERR_VALUE(ret))
	if (ret < 0)
		return ret;

	fep->mii_timeout = 0;
@@ -1818,7 +1818,7 @@ static int fec_enet_mdio_write(struct mii_bus *bus, int mii_id, int regnum,
	int ret = 0;

	ret = pm_runtime_get_sync(dev);
	if (IS_ERR_VALUE(ret))
	if (ret < 0)
		return ret;

	fep->mii_timeout = 0;
@@ -2870,7 +2870,7 @@ fec_enet_open(struct net_device *ndev)
	int ret;

	ret = pm_runtime_get_sync(&fep->pdev->dev);
	if (IS_ERR_VALUE(ret))
	if (ret < 0)
		return ret;

	pinctrl_pm_select_default_state(&fep->pdev->dev);