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 <paweldembicki@gmail.com>
This commit is contained in:
		 Pawel Dembicki
					Pawel Dembicki
				
			
				
					committed by
					
						 John Crispin
						John Crispin
					
				
			
			
				
	
			
			
			 John Crispin
						John Crispin
					
				
			
						parent
						
							ed25e3ac02
						
					
				
				
					commit
					e61812fd34
				
			| @@ -2104,6 +2104,7 @@ ar8xxx_phy_read_status(struct phy_device *phydev) | ||||
|  | ||||
| 	phydev->state = PHY_RUNNING; | ||||
| 	netif_carrier_on(phydev->attached_dev); | ||||
| 	if (phydev->adjust_link) | ||||
| 		phydev->adjust_link(phydev->attached_dev); | ||||
|  | ||||
| 	return 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user