[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BL0PR11MB3012FA0DEC75685EA73D7F4CE7740@BL0PR11MB3012.namprd11.prod.outlook.com>
Date: Mon, 11 Nov 2019 21:47:11 +0000
From: <Woojung.Huh@...rochip.com>
To: <Horatiu.Vultur@...rochip.com>
CC: <alexandre.belloni@...tlin.com>, <UNGLinuxDriver@...rochip.com>,
<davem@...emloft.net>, <andrew@...n.ch>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <Horatiu.Vultur@...rochip.com>
Subject: RE: [PATCH] net: mscc: ocelot: reinterpret the return value of
of_get_phy_mode
Hi Horatiu,
> - err = of_get_phy_mode(portnp, &phy_mode);
> - if (err && err != -ENODEV)
> - goto out_put_ports;
> + phy_err = of_get_phy_mode(portnp, &phy_mode);
> + if (phy_err)
> + phy_mode = PHY_INTERFACE_MODE_NA;
Because of_get_phy_mode() would assign PHY_INTERFACE_MODE_NA to phy_mode
when error, may not need this "if (phy_err)" statement at all.
Thanks.
Woojung
Powered by blists - more mailing lists