summaryrefslogtreecommitdiff
path: root/fs/smb/client/fscache.h
diff options
context:
space:
mode:
authorLi Nan <linan122@huawei.com>2023-12-08 11:23:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-10 17:36:00 +0300
commitf3e692c8c24a7161667413c2f75236d616317ae2 (patch)
tree29112fcef204c62ba2edbe5622a634fa6de79e06 /fs/smb/client/fscache.h
parent56de23eac65fd54666316761c75d3cb8c8f8662d (diff)
downloadlinux-f3e692c8c24a7161667413c2f75236d616317ae2.tar.xz
scsi: sd: Unregister device if device_add_disk() failed in sd_probe()
[ Upstream commit 0296bea01cfa6526be6bd2d16dc83b4e7f1af91f ] "if device_add() succeeds, you should call device_del() when you want to get rid of it." In sd_probe(), device_add_disk() fails when device_add() has already succeeded, so change put_device() to device_unregister() to ensure device resources are released. Fixes: 2a7a891f4c40 ("scsi: sd: Add error handling support for add_disk()") Signed-off-by: Li Nan <linan122@huawei.com> Link: https://lore.kernel.org/r/20231208082335.1754205-1-linan666@huaweicloud.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/smb/client/fscache.h')
0 files changed, 0 insertions, 0 deletions