Skip to content

Commit 4d96e13

Browse files
Salil Mehtadavem330
authored andcommitted
net: hns: Fixes the missing put_device in positive leg for roce reset
This patch fixes the missing device reference release-after-use in the positive leg of the roce reset API of the HNS DSAF. Fixes: c969c6e ("net: hns: Fix object reference leaks in hns_dsaf_roce_reset()") Reported-by: John Garry <john.garry@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 92a8c29 commit 4d96e13

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3128,6 +3128,9 @@ int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool dereset)
31283128
dsaf_set_bit(credit, DSAF_SBM_ROCEE_CFG_CRD_EN_B, 1);
31293129
dsaf_write_dev(dsaf_dev, DSAF_SBM_ROCEE_CFG_REG_REG, credit);
31303130
}
3131+
3132+
put_device(&pdev->dev);
3133+
31313134
return 0;
31323135
}
31333136
EXPORT_SYMBOL(hns_dsaf_roce_reset);

0 commit comments

Comments
 (0)