Skip to content

Commit b95c8c3

Browse files
harshimogalapallikuba-moo
authored andcommitted
octeontx2-pf: fix error handling of devlink port in rvu_rep_create()
Unregister the devlink port when register_netdev() fails. Fixes: 9ed0343 ("octeontx2-pf: Add devlink port support") Reviewed-by: Przemek Kitszel <[email protected]> Signed-off-by: Harshit Mogalapalli <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 51df947 commit b95c8c3

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/ethernet/marvell/octeontx2/nic

1 file changed

+1
-0
lines changed

drivers/net/ethernet/marvell/octeontx2/nic/rep.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,7 @@ int rvu_rep_create(struct otx2_nic *priv, struct netlink_ext_ack *extack)
690690
if (err) {
691691
NL_SET_ERR_MSG_MOD(extack,
692692
"PFVF representor registration failed");
693+
rvu_rep_devlink_port_unregister(rep);
693694
free_netdev(ndev);
694695
goto exit;
695696
}

0 commit comments

Comments
 (0)