]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fsl/fman: Free init resources on KeyGen failure in fman_init()
authorHaoxiang Li <haoxiang_li2024@163.com>
Thu, 25 Jun 2026 00:48:34 +0000 (08:48 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 30 Jun 2026 08:52:02 +0000 (10:52 +0200)
commitd288efa2b94abc2e45a061fceb156b4f4e5b37be
tree214ad128b9d088e834282bec9fcea700fd2d8934
parent1398b1014909618f65ff6bcebcb2ee5ccd44fdc0
fsl/fman: Free init resources on KeyGen failure in fman_init()

fman_muram_alloc() allocates initialization resources before
initializing the KeyGen block. If keygen_init() fails, the
function returns -EINVAL directly and leaves those resources
allocated. Free the initialization resources before returning
from the KeyGen failure path.

Fixes: 7472f4f281d0 ("fsl/fman: enable FMan Keygen")
Cc: stable@kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20260625004834.3394389-1-haoxiang_li2024@163.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/freescale/fman/fman.c