usb: musb: omap2430: fix PHY error handling
PHY layer no longer returns NULL. It will return -ENXIO when PHY layer isn't enabled and we can use that to bail out instead of request a probe deferral. Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
		
					parent
					
						
							
								f4f5ba5e7d
							
						
					
				
			
			
				commit
				
					
						a90199bb94
					
				
			
		
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
					@ -353,7 +353,12 @@ static int omap2430_musb_init(struct musb *musb)
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		musb->xceiv = devm_usb_get_phy_dev(dev, 0);
 | 
							musb->xceiv = devm_usb_get_phy_dev(dev, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (IS_ERR_OR_NULL(musb->xceiv)) {
 | 
						if (IS_ERR(musb->xceiv)) {
 | 
				
			||||||
 | 
							status = PTR_ERR(musb->xceiv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (status == -ENXIO)
 | 
				
			||||||
 | 
								return status;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		pr_err("HS USB OTG: no transceiver configured\n");
 | 
							pr_err("HS USB OTG: no transceiver configured\n");
 | 
				
			||||||
		return -EPROBE_DEFER;
 | 
							return -EPROBE_DEFER;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue