Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 323b15b9 authored by xypron.glpk@gmx.de's avatar xypron.glpk@gmx.de Committed by David S. Miller
Browse files

net: bcm63xx: avoid possible null pointer dereference



If dev_get_platdata has failed pd is null.
Do not dereference a null pointer.

Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fb160ebd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1859,7 +1859,7 @@ static int bcm_enet_probe(struct platform_device *pdev)
	} else {

		/* run platform code to initialize PHY device */
		if (pd->mii_config &&
		if (pd && pd->mii_config &&
		    pd->mii_config(dev, 1, bcm_enet_mdio_read_mii,
				   bcm_enet_mdio_write_mii)) {
			dev_err(&pdev->dev, "unable to configure mdio bus\n");