aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/libiscsi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index dfaa8adf099e..689628359169 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1999,8 +1999,10 @@ iscsi_pool_init(struct iscsi_pool *q, int max, void ***items, int item_size)
1999 1999
2000 q->queue = kfifo_init((void*)q->pool, max * sizeof(void*), 2000 q->queue = kfifo_init((void*)q->pool, max * sizeof(void*),
2001 GFP_KERNEL, NULL); 2001 GFP_KERNEL, NULL);
2002 if (q->queue == ERR_PTR(-ENOMEM)) 2002 if (IS_ERR(q->queue)) {
2003 q->queue = NULL;
2003 goto enomem; 2004 goto enomem;
2005 }
2004 2006
2005 for (i = 0; i < max; i++) { 2007 for (i = 0; i < max; i++) {
2006 q->pool[i] = kzalloc(item_size, GFP_KERNEL); 2008 q->pool[i] = kzalloc(item_size, GFP_KERNEL);