diff options
author | Matt Merhar <mattmerhar@protonmail.com> | 2018-08-30 08:58:26 -0400 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2018-09-06 21:35:53 +0200 |
commit | 9c26def64ad9891a036dcabcde11d58ecd59e8f4 (patch) | |
tree | 5038401a60465824c27e5e8e241ff0def3580831 | |
parent | b672550b3234bacf347e1adefb529f87f799aada (diff) | |
download | mtk-20170518-9c26def64ad9891a036dcabcde11d58ecd59e8f4.zip mtk-20170518-9c26def64ad9891a036dcabcde11d58ecd59e8f4.tar.gz mtk-20170518-9c26def64ad9891a036dcabcde11d58ecd59e8f4.tar.bz2 |
ath79: fix unaligned access panic in ag71xx_mdio_probe
Without "syscon" being present in an ag71xx ethernet DT node's
compatible property, a panic occurs at boot during probe citing
"Unhandled kernel unaligned access".
With this modification, the panic no longer occurs and instead the probe
simply fails, allowing the boot process to continue.
Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
-rw-r--r-- | target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c index 0bfc154..58aef74 100644 --- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c +++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c @@ -183,8 +183,8 @@ static int ag71xx_mdio_probe(struct platform_device *pdev) return -ENOMEM; am->mii_regmap = syscon_regmap_lookup_by_phandle(np, "regmap"); - if (!am->mii_regmap) - return -ENOENT; + if (IS_ERR(am->mii_regmap)) + return PTR_ERR(am->mii_regmap); mii_bus = devm_mdiobus_alloc(amdev); if (!mii_bus) |