net: stmmac: Remove if condition by taking advantage of hwif return code
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 18 May 2018 13:56:09 +0000 (14:56 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 May 2018 15:00:16 +0000 (11:00 -0400)
commit61fac60a6ab72efb3b1ef7d052724fbeed52fe97
treefc1b7bfb3026fe7e17c0f449039884c1ecf5e9da
parentd2df9ea0ade7ef73710603da97b72394c53a111c
net: stmmac: Remove if condition by taking advantage of hwif return code

We can remove the if condition and check if return code is different
than -EINVAL, meaning callback is present.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: Vitor Soares <soares@synopsys.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c