diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 41635b13ccb1..9a3c138ec50c 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -1533,19 +1533,16 @@ zfcp_gid_pn_buffers_alloc(struct zfcp_gid_pn_data **gid_pn, mempool_t *pool) | |||
1533 | { | 1533 | { |
1534 | struct zfcp_gid_pn_data *data; | 1534 | struct zfcp_gid_pn_data *data; |
1535 | 1535 | ||
1536 | if (pool != NULL) { | 1536 | if (pool) |
1537 | data = mempool_alloc(pool, GFP_ATOMIC); | 1537 | data = mempool_alloc(pool, GFP_ATOMIC); |
1538 | if (likely(data != NULL)) { | 1538 | else |
1539 | data->ct.pool = pool; | ||
1540 | } | ||
1541 | } else { | ||
1542 | data = kmem_cache_alloc(zfcp_data.gid_pn_cache, GFP_ATOMIC); | 1539 | data = kmem_cache_alloc(zfcp_data.gid_pn_cache, GFP_ATOMIC); |
1543 | } | ||
1544 | 1540 | ||
1545 | if (NULL == data) | 1541 | if (NULL == data) |
1546 | return -ENOMEM; | 1542 | return -ENOMEM; |
1547 | 1543 | ||
1548 | memset(data, 0, sizeof(*data)); | 1544 | memset(data, 0, sizeof(*data)); |
1545 | data->ct.pool = pool; | ||
1549 | sg_init_table(&data->req , 1); | 1546 | sg_init_table(&data->req , 1); |
1550 | sg_init_table(&data->resp , 1); | 1547 | sg_init_table(&data->resp , 1); |
1551 | data->ct.req = &data->req; | 1548 | data->ct.req = &data->req; |