]> www.infradead.org Git - users/jedix/linux-maple.git/commit
firmware: stratix10-svc: fix error handle while alloc/add device failed
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 29 Nov 2022 16:36:02 +0000 (10:36 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:33 +0000 (09:33 +0100)
commit77968ae69d4fb7618d4d86e5a6b039c34f3bdfc4
tree13e1dcefc0aed0211acb23ea8f860a7e85b629b5
parent6fcedeadb3ef8dfec02e6a8ba3f9c4bbc9543dfd
firmware: stratix10-svc: fix error handle while alloc/add device failed

[ Upstream commit d66a4c20ae55ac88136b4a3befd944c093ffa677 ]

If add device "stratix10-rsu" failed in stratix10_svc_drv_probe(),
the 'svc_fifo' and 'genpool' need be freed in the error path.

If allocate or add device "intel-fcs" failed in stratix10_svc_drv_probe(),
the device "stratix10-rsu" need be unregistered in the error path.

Fixes: e6281c26674e ("firmware: stratix10-svc: Add support for FCS")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/20221129163602.462369-2-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/stratix10-svc.c