summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_debug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index cf3f58e8f733..f4fa1035a191 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -6992,8 +6992,10 @@ static int __init scsi_debug_init(void)
sdebug_add_host = 0;
queued_cmd_cache = KMEM_CACHE(sdebug_queued_cmd, SLAB_HWCACHE_ALIGN);
- if (!queued_cmd_cache)
+ if (!queued_cmd_cache) {
+ ret = -ENOMEM;
goto driver_unreg;
+ }
for (k = 0; k < hosts_to_add; k++) {
if (want_store && k == 0) {