File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
drivers/net/ethernet/cavium/thunder Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -1493,13 +1493,17 @@ static int bgx_init_of_phy(struct bgx *bgx)
14931493 * this cortina phy, for which there is no driver
14941494 * support, ignore it.
14951495 */
1496- if (phy_np &&
1497- !of_device_is_compatible (phy_np , "cortina,cs4223-slice" )) {
1498- /* Wait until the phy drivers are available */
1499- pd = of_phy_find_device (phy_np );
1500- if (!pd )
1501- goto defer ;
1502- bgx -> lmac [lmac ].phydev = pd ;
1496+ if (phy_np ) {
1497+ if (!of_device_is_compatible (phy_np , "cortina,cs4223-slice" )) {
1498+ /* Wait until the phy drivers are available */
1499+ pd = of_phy_find_device (phy_np );
1500+ if (!pd ) {
1501+ of_node_put (phy_np );
1502+ goto defer ;
1503+ }
1504+ bgx -> lmac [lmac ].phydev = pd ;
1505+ }
1506+ of_node_put (phy_np );
15031507 }
15041508
15051509 lmac ++ ;
You can’t perform that action at this time.
0 commit comments