]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit2271150bfb814b72ec57ae2fdf66e39da2eafafd
treee5416d0f9b795b5a888ab77c95f20d535479115f
parent6bed0118012ea350acbe606ab3ae0ed3d60ed5f3
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: 6fe6611ff275 ("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