[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191001.090320.1192378852987776883.davem@davemloft.net>
Date: Tue, 01 Oct 2019 09:03:20 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: o.rempel@...gutronix.de
Cc: jcliburn@...il.com, chris.snook@...il.com, andrew@...n.ch,
kernel@...gutronix.de, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2] net: ag71xx: fix mdio subnode support
From: Oleksij Rempel <o.rempel@...gutronix.de>
Date: Tue, 1 Oct 2019 08:41:47 +0200
> @@ -571,7 +571,9 @@ static int ag71xx_mdio_probe(struct ag71xx *ag)
> msleep(200);
> }
>
> - err = of_mdiobus_register(mii_bus, np);
> + mnp = of_get_child_by_name(np, "mdio");
> + err = of_mdiobus_register(mii_bus, mnp);
of_get_child_by_name() can fail, so error checking is necessary
before you pass mnp into of_mdiobus_register().
Powered by blists - more mailing lists