net: hns: Fixes the missing put_device in positive leg for roce reset
authorSalil Mehta <salil.mehta@huawei.com>
Mon, 18 Feb 2019 17:40:32 +0000 (17:40 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jun 2020 06:16:48 +0000 (08:16 +0200)
commitbd756613f02baa088d2ebb476b40c1334ef97cf6
treeef5988c46b1354caf4fbe460fcfb7e118f129690
parentd5375ed938b7e85b443894f9e7090ec7e803d0cd
net: hns: Fixes the missing put_device in positive leg for roce reset

commit 4d96e13ee9cd1f7f801e8c7f4b12f09d1da4a5d8 upstream.

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 <john.garry@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c