net: phy: phy driver features are mandatory

[ Upstream commit 3e64cf7a43 ]

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: 719655a149 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Camelia Groza 2019-01-17 14:22:36 +02:00 • committed by Greg Kroah-Hartman
commit 850d84830a
2 changed files with 7 additions and 2 deletions