Skip to content

Commit

Permalink
net: hns: Fixes the missing put_device in positive leg for roce reset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Salil Mehta authored and David S. Miller committed Feb 19, 2019
1 parent 92a8c29 commit 4d96e13
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4d96e13

Please sign in to comment.