diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/libiscsi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 97d27d78f4f..cb009f39d83 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -1811,8 +1811,10 @@ iscsi_pool_init(struct iscsi_pool *q, int max, void ***items, int item_size) q->queue = kfifo_init((void*)q->pool, max * sizeof(void*), GFP_KERNEL, NULL); - if (q->queue == ERR_PTR(-ENOMEM)) + if (IS_ERR(q->queue)) { + q->queue = NULL; goto enomem; + } for (i = 0; i < max; i++) { q->pool[i] = kzalloc(item_size, GFP_KERNEL); |