Skip to content

Commit 557f050

Browse files
Yang Yingliangdavem330
authored andcommitted
net: dsa: fix wrong pointer passed to PTR_ERR() in dsa_port_phylink_create()
Fix wrong pointer passed to PTR_ERR() in dsa_port_phylink_create() to print error message. Fixes: cf5ca4d ("net: dsa: don't leave dangling pointers in dp->pl when failing") Signed-off-by: Yang Yingliang <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 897fab7 commit 557f050

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/dsa/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ int dsa_port_phylink_create(struct dsa_port *dp)
16811681
pl = phylink_create(&dp->pl_config, of_fwnode_handle(dp->dn),
16821682
mode, &dsa_port_phylink_mac_ops);
16831683
if (IS_ERR(pl)) {
1684-
pr_err("error creating PHYLINK: %ld\n", PTR_ERR(dp->pl));
1684+
pr_err("error creating PHYLINK: %ld\n", PTR_ERR(pl));
16851685
return PTR_ERR(pl);
16861686
}
16871687

0 commit comments

Comments
 (0)