mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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: Heinrich Schuchardt <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
fb160ebd51
commit
323b15b997
1 changed files with 1 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue