]> git.baikalelectronics.ru Git - kernel.git/commit
hinic: fix potential resource leak
authorWei Li <liwei391@huawei.com>
Thu, 17 Sep 2020 12:29:50 +0000 (20:29 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Sep 2020 00:03:55 +0000 (17:03 -0700)
commitb8ad9f909481494e06d75add93387bb19cc87f12
tree2f63ec02d63e42e61fd07a29c44d49d0e46ed243
parent670c80fd3b9f1749f8e134c69bffce5a1f665ffc
hinic: fix potential resource leak

In rx_request_irq(), it will just return what irq_set_affinity_hint()
returns. If it is failed, the napi and irq requested are not freed
properly. So add exits for failures to handle these.

Signed-off-by: Wei Li <liwei391@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/huawei/hinic/hinic_rx.c