qed: Add cleanup in qed_slowpath_start()
authorWenwen Wang <wenwen@cs.uga.edu>
Wed, 21 Aug 2019 04:46:36 +0000 (23:46 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Aug 2019 23:11:31 +0000 (16:11 -0700)
commitde0e4fd2f07ce3bbdb69dfb8d9426b7227451b69
tree6365dd55cb923499e6b7fd809da22cb960545f48
parenta71d9eff9394d24f05cbe115309152fb4543cd6c
qed: Add cleanup in qed_slowpath_start()

If qed_mcp_send_drv_version() fails, no cleanup is executed, leading to
memory leaks. To fix this issue, introduce the label 'err4' to perform the
cleanup work before returning the error.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Acked-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_main.c