mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	usb: chipidea: fix static checker warning for NULL pointer
During the static checker, "data->usbmisc_data" may be NULL. Fix it by adding this pointer judgement before using. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Peter Chen <peter.chen@nxp.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
		
							parent
							
								
									a817c59e82
								
							
						
					
					
						commit
						8ff396fe56
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -316,7 +316,8 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
 | 
			
		|||
	if (IS_ERR(data->usbmisc_data))
 | 
			
		||||
		return PTR_ERR(data->usbmisc_data);
 | 
			
		||||
 | 
			
		||||
	if (of_usb_get_phy_mode(dev->of_node) == USBPHY_INTERFACE_MODE_HSIC) {
 | 
			
		||||
	if ((of_usb_get_phy_mode(dev->of_node) == USBPHY_INTERFACE_MODE_HSIC)
 | 
			
		||||
		&& data->usbmisc_data) {
 | 
			
		||||
		pdata.flags |= CI_HDRC_IMX_IS_HSIC;
 | 
			
		||||
		data->usbmisc_data->hsic = 1;
 | 
			
		||||
		data->pinctrl = devm_pinctrl_get(dev);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue