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

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: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Fabio Estevam and committed by
David S. Miller
b0c6ce24 140d8b33

+3 -3
+3 -3
drivers/net/ethernet/freescale/fec_main.c
··· 1779 1779 int ret = 0; 1780 1780 1781 1781 ret = pm_runtime_get_sync(dev); 1782 - if (IS_ERR_VALUE(ret)) 1782 + if (ret < 0) 1783 1783 return ret; 1784 1784 1785 1785 fep->mii_timeout = 0; ··· 1818 1818 int ret = 0; 1819 1819 1820 1820 ret = pm_runtime_get_sync(dev); 1821 - if (IS_ERR_VALUE(ret)) 1821 + if (ret < 0) 1822 1822 return ret; 1823 1823 1824 1824 fep->mii_timeout = 0; ··· 2870 2870 int ret; 2871 2871 2872 2872 ret = pm_runtime_get_sync(&fep->pdev->dev); 2873 - if (IS_ERR_VALUE(ret)) 2873 + if (ret < 0) 2874 2874 return ret; 2875 2875 2876 2876 pinctrl_pm_select_default_state(&fep->pdev->dev);