Li Nan
9adcfd5670
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>
2024-04-10 16:28:31 +02:00
..
2024-01-01 12:39:06 +00:00
2022-09-15 22:01:24 -04:00
2023-03-10 09:33:20 +01:00
2024-02-05 20:12:50 +00:00
2022-02-22 21:11:03 -05:00
2023-12-13 18:39:16 +01:00
2024-03-26 18:20:55 -04:00
2024-01-01 12:39:01 +00:00
2022-06-21 21:14:54 -04:00
2024-03-26 18:20:55 -04:00
2022-10-11 17:42:58 -06:00
2022-09-06 22:05:59 -04:00
2023-03-30 12:49:03 +02:00
2022-12-31 13:33:05 +01:00
2022-09-06 22:24:37 -04:00
2024-02-23 09:12:37 +01:00
2024-01-25 15:27:26 -08:00
2024-02-05 20:12:52 +00:00
2023-11-28 17:06:59 +00:00
2022-09-15 22:30:26 -04:00
2024-02-05 20:13:00 +00:00
2024-02-05 20:12:51 +00:00
2024-04-03 15:19:54 +02:00
2024-04-03 15:19:54 +02:00
2023-11-28 17:07:07 +00:00
2024-02-05 20:12:50 +00:00
2024-03-26 18:20:26 -04:00
2022-04-06 22:27:08 -04:00
2022-04-06 22:11:52 -04:00
2023-10-06 14:56:54 +02:00
2023-10-06 14:56:52 +02:00
2023-09-13 09:42:24 +02:00
2024-04-03 15:19:54 +02:00
2023-09-13 09:42:52 +02:00
2024-03-01 13:26:35 +01:00
2023-08-30 16:11:12 +02:00
2022-06-21 21:41:19 -04:00
2022-09-06 22:22:24 -04:00
2022-01-24 23:30:28 -05:00
2023-07-19 16:21:35 +02:00
2022-09-25 13:06:00 -04:00
2023-08-16 18:27:30 +02:00
2021-11-29 23:02:13 -05:00
2022-07-07 17:01:22 -04:00
2022-07-07 17:01:22 -04:00
2022-02-22 21:11:03 -05:00
2022-03-29 23:42:18 -04:00
2022-04-25 23:25:11 -04:00
2022-02-22 21:11:02 -05:00
2022-02-22 21:11:03 -05:00
2021-11-29 23:02:13 -05:00
2022-06-27 22:52:05 -04:00
2022-07-26 22:13:29 -04:00
2022-04-26 08:51:56 -04:00
2022-02-22 21:11:03 -05:00
2022-02-22 21:11:04 -05:00
2022-02-22 21:11:04 -05:00
2022-02-22 21:11:04 -05:00
2022-08-01 19:52:03 -04:00
2022-02-22 21:11:03 -05:00
2022-07-13 23:18:26 -04:00
2024-04-03 15:19:51 +02:00
2023-02-01 08:34:36 +01:00
2022-09-25 13:02:23 -04:00
2022-09-25 13:04:17 -04:00
2022-02-22 21:11:04 -05:00
2022-02-22 21:11:04 -05:00
2022-08-31 23:39:57 -04:00
2022-02-22 21:11:05 -05:00
2023-03-11 13:55:29 +01:00
2022-02-22 21:11:02 -05:00
2023-10-06 14:56:38 +02:00
2022-09-25 14:27:47 -04:00
2024-03-01 13:26:35 +01:00
2022-06-21 21:19:23 -04:00
2023-02-09 11:28:12 +01:00
2022-04-25 23:23:05 -04:00
2022-02-27 21:35:30 -05:00
2022-02-22 21:11:03 -05:00
2022-06-27 22:56:21 -04:00
2023-05-11 23:03:19 +09:00
2022-02-22 21:11:05 -05:00
2022-06-26 10:29:44 +10:00
2022-02-27 21:34:02 -05:00
2022-02-22 21:11:07 -05:00
2023-10-10 22:00:35 +02:00
2022-02-22 21:11:06 -05:00
2024-04-10 16:28:31 +02:00
2024-04-10 16:28:31 +02:00
2022-02-22 21:11:07 -05:00
2022-02-22 21:11:07 -05:00
2022-02-22 21:11:03 -05:00
2022-02-22 21:11:03 -05:00
2022-02-22 21:11:06 -05:00
2022-02-22 21:11:06 -05:00
2022-06-07 22:05:14 -04:00
2022-03-29 23:32:26 -04:00
2022-02-22 21:11:06 -05:00
2022-05-19 20:26:21 -04:00
2022-02-22 21:11:06 -05:00
2022-02-22 21:11:02 -05:00
2022-02-22 21:11:02 -05:00
2022-09-06 22:14:14 -04:00
2023-08-30 16:11:12 +02:00
2022-03-15 14:05:02 -04:00
2022-12-31 13:32:35 +01:00
2022-03-01 22:21:50 -05:00
2023-03-30 12:49:21 +02:00
2024-02-16 19:06:29 +01:00
2022-09-30 07:51:13 -06:00
2024-03-06 14:45:04 +00:00
2022-03-29 23:29:19 -04:00
2021-12-22 23:38:29 -05:00
2024-02-05 20:13:00 +00:00
2023-08-16 18:27:30 +02:00
2024-04-03 15:19:51 +02:00
2023-10-10 22:00:35 +02:00
2022-09-25 12:52:48 -04:00
2023-09-13 09:42:51 +02:00
2022-11-08 01:52:52 +00:00
2022-09-07 21:53:48 +02:00
2024-03-01 13:26:31 +01:00
2022-05-08 14:28:18 -04:00
2022-05-02 16:59:11 -04:00
2023-03-17 08:50:27 +01:00
2024-04-10 16:28:31 +02:00
2023-10-10 22:00:35 +02:00
2023-04-20 12:35:13 +02:00
2023-02-09 11:28:04 +01:00
2022-02-22 21:11:07 -05:00
2022-04-18 22:48:31 -04:00
2021-12-22 23:41:13 -05:00
2022-06-28 06:30:26 -06:00
2022-03-08 19:40:01 -07:00
2022-10-07 12:33:18 -07:00
2022-03-08 19:40:00 -07:00
2023-06-09 10:34:21 +02:00
2024-02-23 09:12:32 +01:00
2022-02-22 21:11:03 -05:00
2023-10-10 22:00:35 +02:00
2022-04-06 23:01:54 -04:00
2022-06-07 21:30:56 -04:00
2022-09-25 13:29:53 -04:00
2022-09-25 13:29:53 -04:00
2022-03-01 23:56:28 -05:00
2022-02-22 21:11:07 -05:00
2022-09-06 22:05:58 -04:00
2022-02-22 21:11:07 -05:00
2022-03-30 00:05:42 -04:00