Skip to content

Commit fcf247d

Browse files
guixinliu1995martinkpetersen
authored andcommitted
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: df032bf ("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>
1 parent 98b3788 commit fcf247d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/ufs/core/ufs_bsg.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ int ufs_bsg_probe(struct ufs_hba *hba)
257257
NULL, 0);
258258
if (IS_ERR(q)) {
259259
ret = PTR_ERR(q);
260+
device_del(bsg_dev);
260261
goto out;
261262
}
262263

0 commit comments

Comments
 (0)