diff options
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r-- | drivers/scsi/libiscsi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 809d32d95c76..c33e28fd49bc 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -1944,7 +1944,7 @@ iscsi_pool_init(struct iscsi_pool *q, int max, void ***items, int item_size) | |||
1944 | num_arrays++; | 1944 | num_arrays++; |
1945 | q->pool = kzalloc(num_arrays * max * sizeof(void*), GFP_KERNEL); | 1945 | q->pool = kzalloc(num_arrays * max * sizeof(void*), GFP_KERNEL); |
1946 | if (q->pool == NULL) | 1946 | if (q->pool == NULL) |
1947 | goto enomem; | 1947 | return -ENOMEM; |
1948 | 1948 | ||
1949 | q->queue = kfifo_init((void*)q->pool, max * sizeof(void*), | 1949 | q->queue = kfifo_init((void*)q->pool, max * sizeof(void*), |
1950 | GFP_KERNEL, NULL); | 1950 | GFP_KERNEL, NULL); |
@@ -1979,8 +1979,7 @@ void iscsi_pool_free(struct iscsi_pool *q) | |||
1979 | 1979 | ||
1980 | for (i = 0; i < q->max; i++) | 1980 | for (i = 0; i < q->max; i++) |
1981 | kfree(q->pool[i]); | 1981 | kfree(q->pool[i]); |
1982 | if (q->pool) | 1982 | kfree(q->pool); |
1983 | kfree(q->pool); | ||
1984 | kfree(q->queue); | 1983 | kfree(q->queue); |
1985 | } | 1984 | } |
1986 | EXPORT_SYMBOL_GPL(iscsi_pool_free); | 1985 | EXPORT_SYMBOL_GPL(iscsi_pool_free); |