net: hns: Fixes the missing put_device in positive leg for roce reset
PATCH 1/1 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 c969c6e7ab8c ("net: hns: Fix object reference leaks in hns_dsaf_roce_reset()")
Reported-by John Garry <[email protected]>
Signed-off-by Salil Mehta <[email protected]>
--- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c +3 -0
@@ -3128,6 +3128,9 @@ int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool dereset)dsaf_set_bit (credit,DSAF_SBM_ROCEE_CFG_CRD_EN_B ,1 );dsaf_write_dev (dsaf_dev,DSAF_SBM_ROCEE_CFG_REG_REG , credit); } + +put_device (&pdev->dev); +return 0 ; }EXPORT_SYMBOL (hns_dsaf_roce_reset);
Signature · 1 line
2.7.4
From: Salil Mehta <[email protected]>
Date: Mon, 18 Feb 2019 17:40:32 +0000
Quoted 6 lines
This patch fixes the missing device reference release-after-use in the positive leg of the roce reset API of the HNS DSAF.
Fixes c969c6e7ab8c ("net: hns: Fix object reference leaks in hns_dsaf_roce_reset()")Reported-by John Garry <[email protected]>Signed-off-by Salil Mehta <[email protected]>
Applied, thanks Salil.