[Linux-stm32] [PATCH] net: stmmac: fix a potential NULL pointer dereference

David Miller davem at davemloft.net
Tue Mar 26 00:15:35 UTC 2019


From: Kangjie Lu <kjlu at umn.edu>
Date: Fri, 22 Mar 2019 22:39:42 -0500

> @@ -485,6 +485,8 @@ static int dwc_eth_dwmac_remove(struct platform_device *pdev)
>  	int err;
>  
>  	data = of_device_get_match_data(&pdev->dev);
> +	if (!data)
> +		return -EINVAL;
>  
>  	err = stmmac_dvr_remove(&pdev->dev);
>  	if (err < 0)
> -- 
> 2.17.1
> 

Please show me the entry in dwc_eth_dwmac_driver that has a NULL of_match_table
field.

Otherwise I'm not applying this.



More information about the Linux-stm32 mailing list