>-----Original Message----- >From: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx> >Sent: Tuesday, December 17, 2024 10:53 AM >To: Sunil Kovvuri Goutham <sgoutham@xxxxxxxxxxx>; Geethasowjanya Akula ><gakula@xxxxxxxxxxx>; Subbaraya Sundeep Bhatta <sbhatta@xxxxxxxxxxx>; >Hariprasad Kelam <hkelam@xxxxxxxxxxx>; Bharat Bhushan ><bbhushan2@xxxxxxxxxxx>; Andrew Lunn <andrew+netdev@xxxxxxx>; David >S. Miller <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; >Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; Simon >Horman <horms@xxxxxxxxxx>; netdev@xxxxxxxxxxxxxxx; linux- >kernel@xxxxxxxxxxxxxxx >Cc: dan.carpenter@xxxxxxxxxx; kernel-janitors@xxxxxxxxxxxxxxx; >error27@xxxxxxxxx; harshit.m.mogalapalli@xxxxxxxxxx; Przemek Kitszel ><przemyslaw.kitszel@xxxxxxxxx> >Subject: [EXTERNAL] [PATCH net v2 2/2] octeontx2-pf: fix error handling of >devlink port in rvu_rep_create() > >Unregister the devlink port when register_netdev() fails. > >Fixes: 9ed0343f561e ("octeontx2-pf: Add devlink port support") >Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@xxxxxxxxx> >Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx> >--- >v1->v2: Add R.B from Przemek >--- > drivers/net/ethernet/marvell/octeontx2/nic/rep.c | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/rep.c >b/drivers/net/ethernet/marvell/octeontx2/nic/rep.c >index 9e3fcbae5dee..04e08e06f30f 100644 >--- a/drivers/net/ethernet/marvell/octeontx2/nic/rep.c >+++ b/drivers/net/ethernet/marvell/octeontx2/nic/rep.c >@@ -690,6 +690,7 @@ int rvu_rep_create(struct otx2_nic *priv, struct >netlink_ext_ack *extack) > if (err) { > NL_SET_ERR_MSG_MOD(extack, > "PFVF representor registration >failed"); >+ rvu_rep_devlink_port_unregister(rep); > free_netdev(ndev); > goto exit; > } >-- >2.46.0 Ack. Thanks.