mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
scsi: ufs: bsg: Delete bsg_dev when setting up bsg fails
We should remove the bsg device when bsg_setup_queue() fails to release the
resources.
Fixes: df032bf27a ("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>
This commit is contained in:
committed by
Martin K. Petersen
parent
98b37881b7
commit
fcf247deb3
@@ -257,6 +257,7 @@ int ufs_bsg_probe(struct ufs_hba *hba)
|
||||
NULL, 0);
|
||||
if (IS_ERR(q)) {
|
||||
ret = PTR_ERR(q);
|
||||
device_del(bsg_dev);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user