b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | From 219e330d8b6b5e3f84a7a593969f948bf2fec558 Mon Sep 17 00:00:00 2001 |
| 2 | From: Claudiu Manoil <claudiu.manoil@nxp.com> |
| 3 | Date: Fri, 6 Sep 2019 16:17:20 +0300 |
| 4 | Subject: [PATCH] enetc: Drop redundant device node check |
| 5 | |
| 6 | The existence of the DT port node is the first thing checked |
| 7 | at probe time, and probing won't continue if the node is missing. |
| 8 | |
| 9 | Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> |
| 10 | --- |
| 11 | drivers/net/ethernet/freescale/enetc/enetc_pf.c | 5 ----- |
| 12 | 1 file changed, 5 deletions(-) |
| 13 | |
| 14 | --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c |
| 15 | +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c |
| 16 | @@ -757,11 +757,6 @@ static int enetc_of_get_phy(struct enetc |
| 17 | int phy_mode; |
| 18 | int err; |
| 19 | |
| 20 | - if (!np) { |
| 21 | - dev_err(priv->dev, "missing ENETC port node\n"); |
| 22 | - return -ENODEV; |
| 23 | - } |
| 24 | - |
| 25 | priv->phy_node = of_parse_phandle(np, "phy-handle", 0); |
| 26 | if (!priv->phy_node) { |
| 27 | if (!of_phy_is_fixed_link(np)) { |