diff mbox

[OpenWrt-Devel,1/3] phy/at803x: fix null-pointer access when platform data isn't set

Message ID 1434811105-12736-1-git-send-email-lynxis@fe80.eu
State Superseded
Headers show

Commit Message

Alexander 'lynxis' Couzens June 20, 2015, 2:38 p.m. UTC
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
---
 .../patches-3.18/425-net-phy-at803x-allow-to-configure-via-pdata.patch  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/target/linux/ar71xx/patches-3.18/425-net-phy-at803x-allow-to-configure-via-pdata.patch b/target/linux/ar71xx/patches-3.18/425-net-phy-at803x-allow-to-configure-via-pdata.patch
index d046ede..462a63e 100644
--- a/target/linux/ar71xx/patches-3.18/425-net-phy-at803x-allow-to-configure-via-pdata.patch
+++ b/target/linux/ar71xx/patches-3.18/425-net-phy-at803x-allow-to-configure-via-pdata.patch
@@ -142,7 +142,7 @@ 
  			priv->phy_reset = false;
  		}
 +	}
-+	if (pdata->fixup_rgmii_tx_delay &&
++	if (pdata && pdata->fixup_rgmii_tx_delay &&
 +	    phydev->speed != priv->prev_speed) {
 +		switch (phydev->speed) {
 +		case SPEED_10: