]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: ufs: bsg: Delete bsg_dev when setting up bsg fails
authorGuixin Liu <kanie@linux.alibaba.com>
Wed, 18 Dec 2024 01:42:13 +0000 (09:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Feb 2025 09:02:04 +0000 (10:02 +0100)
commitfe87e27be0a49f2f8d049afeaa3f5835e1bf3249
treed9c60e28483d9b942063c7e19ad048e110688908
parent7847d0fd9ed58c962693ddc545a09a0ffa5cf8ae
scsi: ufs: bsg: Delete bsg_dev when setting up bsg fails

[ Upstream commit fcf247deb3c3e1c6be5774e3fa03bbd018eff1a9 ]

We should remove the bsg device when bsg_setup_queue() fails to release the
resources.

Fixes: df032bf27a41 ("scsi: ufs: Add a bsg endpoint that supports UPIUs")
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Link: https://lore.kernel.org/r/20241218014214.64533-2-kanie@linux.alibaba.com
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ufs/core/ufs_bsg.c