]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns: fix device reference leaks
authorJohan Hovold <johan@kernel.org>
Thu, 3 Nov 2016 17:40:22 +0000 (18:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Nov 2016 18:17:30 +0000 (13:17 -0500)
commit94d5e6e5488e039c3740e608e531418649d36418
treee5416d0f9b795b5a888ab77c95f20d535479115f
parentcea16e51a85e1bcd0ca270d5b333e506b5564c17
net: hns: fix device reference leaks

Make sure to drop the reference taken by class_find_device() in
hnae_get_handle() on errors and when later releasing the handle.

Fixes: 8aa11e41557b ("net: add Hisilicon Network Subsystem...")
Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
Cc: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hnae.c