Re: [PATCH] net: stmmac: fix a potential NULL pointer dereference

From: David Miller
Date: Mon Mar 25 2019 - 20:15:38 EST


From: Kangjie Lu <kjlu@xxxxxxx>
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.