net: phy: phy driver features are mandatory
authorCamelia Groza <camelia.groza@nxp.com>
Thu, 17 Jan 2019 12:22:36 +0000 (14:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Jan 2019 18:03:08 +0000 (10:03 -0800)
commit3e64cf7a435ed0500e3adaa8aada2272d3ae8abc
treee7999c0a0af25273008032ee1b13d1ad64f20aee
parent7afa81c55fca0cad589722cb4bce698b4803b0e1
net: phy: phy driver features are mandatory

Since phy driver features became a link_mode bitmap, phy drivers that
don't have a list of features configured will cause the kernel to crash
when probed.

Prevent the phy driver from registering if the features field is missing.

Fixes: 719655a14971 ("net: phy: Replace phy driver features u32 with link_mode bitmap")
Reported-by: Scott Wood <oss@buserror.net>
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c
include/linux/phy.h