net: fsl_pq_mdio: fix non tbi phy access
Since 952c5ca1 (fsl_pq_mdio: Clean up tbi address configuration) .probe returns
-EBUSY when the "tbi-phy" node is missing. Fix this.
Cc: Andy Fleming <afleming@freescale.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
	
	
This commit is contained in:
		
					parent
					
						
							
								452448f928
							
						
					
				
			
			
				commit
				
					
						c3e072f8a6
					
				
			
		
					 1 changed files with 8 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -356,16 +356,16 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev)
 | 
			
		|||
 | 
			
		||||
		if (prop)
 | 
			
		||||
			tbiaddr = *prop;
 | 
			
		||||
 | 
			
		||||
		if (tbiaddr == -1) {
 | 
			
		||||
			err = -EBUSY;
 | 
			
		||||
 | 
			
		||||
			goto err_free_irqs;
 | 
			
		||||
		} else {
 | 
			
		||||
			out_be32(tbipa, tbiaddr);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (tbiaddr == -1) {
 | 
			
		||||
		err = -EBUSY;
 | 
			
		||||
 | 
			
		||||
		goto err_free_irqs;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	out_be32(tbipa, tbiaddr);
 | 
			
		||||
 | 
			
		||||
	err = of_mdiobus_register(new_bus, np);
 | 
			
		||||
	if (err) {
 | 
			
		||||
		printk (KERN_ERR "%s: Cannot register as MDIO bus\n",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue