]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: Move device_can_wakeup() check earlier in set_wol
authorJisheng Zhang <Jisheng.Zhang@synaptics.com>
Mon, 27 Jul 2020 11:02:13 +0000 (19:02 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jul 2020 00:48:20 +0000 (17:48 -0700)
commit44e960e15ad71d079d40f3f231c83f2177f0c51b
treeb08d8fcf8053b0237b761acc3908a6cf96942093
parent04e40509bb47f504f530b063001977fb3998ac40
net: stmmac: Move device_can_wakeup() check earlier in set_wol

If !device_can_wakeup(), there's no need to futher check. And return
-EOPNOTSUPP rather than -EINVAL if !device_can_wakeup().

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c