net: stmmac: dwmac-rk: Check platform-specific ops
authorDavid Wu <david.wu@rock-chips.com>
Mon, 17 May 2021 15:40:35 +0000 (12:40 -0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 May 2021 22:34:43 +0000 (15:34 -0700)
commit37c80d15ff4bf7526caf5de8b8cab17ac8769d4c
tree86e7a93f9f05648764011e51ca38a3c68c4205c2
parentd6b0625163a8948341d12cac420402a31093b5ed
net: stmmac: dwmac-rk: Check platform-specific ops

Add a check for non-null struct rk_gmac_ops for the
configured PHY interface mode, failing if unsupported.

Signed-off-by: David Wu <david.wu@rock-chips.com>
[Ezequiel: Refactor so it fails if unsupported]
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c