ar8216: add adjust_link checking
authorPawel Dembicki <[email protected]>
Sat, 17 Nov 2018 08:07:47 +0000 (08:07 +0000)
committerJo-Philipp Wich <[email protected]>
Tue, 18 Dec 2018 16:48:17 +0000 (17:48 +0100)
commit3801f7813dc1ba8abce8b89b2f8776c6aa4feaf0
tree7cd22bc2d186483f8479ee036fec3bae7ff4fa26
parentea132fafe4682d4f7fdfb32aa337c45cb5ee7f42
ar8216: add adjust_link checking

Driver crash when 'phydev->adjust_link' isn't provided.

This patch check if 'phydev->adjust_link' exist before
call the method.

Signed-off-by: Pawel Dembicki <[email protected]>
(backported from e61812fd346c43edbb16e87e61ff1a2110ca8eeb)
target/linux/generic/files/drivers/net/phy/ar8216.c