]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
octeontx2-pf: Fix a memleak otx2_sq_init
authorZhipeng Lu <alexious@zju.edu.cn>
Thu, 1 Feb 2024 12:47:13 +0000 (20:47 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Feb 2024 12:48:20 +0000 (12:48 +0000)
commitb09b58e31b0f43d76f79b9943da3fb7c2843dcbb
tree43040dc60f8786bd9ea0dc3dd561ef36963a9685
parentf3616173bf9be9bf39d131b120d6eea4e6324cb5
octeontx2-pf: Fix a memleak otx2_sq_init

When qmem_alloc and pfvf->hw_ops->sq_aq_init fails, sq->sg should be
freed to prevent memleak.

Fixes: c9c12d339d93 ("octeontx2-pf: Add support for PTP clock")
Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>
Acked-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c