aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_erp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_erp.c')
-rw-r--r--drivers/s390/scsi/zfcp_erp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index a6475a2bb8a7..9438d0b28799 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -308,13 +308,15 @@ zfcp_erp_adisc(struct zfcp_port *port)
308 if (send_els == NULL) 308 if (send_els == NULL)
309 goto nomem; 309 goto nomem;
310 310
311 send_els->req = kzalloc(sizeof(struct scatterlist), GFP_ATOMIC); 311 send_els->req = kmalloc(sizeof(struct scatterlist), GFP_ATOMIC);
312 if (send_els->req == NULL) 312 if (send_els->req == NULL)
313 goto nomem; 313 goto nomem;
314 sg_init_table(send_els->req, 1);
314 315
315 send_els->resp = kzalloc(sizeof(struct scatterlist), GFP_ATOMIC); 316 send_els->resp = kmalloc(sizeof(struct scatterlist), GFP_ATOMIC);
316 if (send_els->resp == NULL) 317 if (send_els->resp == NULL)
317 goto nomem; 318 goto nomem;
319 sg_init_table(send_els->resp, 1);
318 320
319 address = (void *) get_zeroed_page(GFP_ATOMIC); 321 address = (void *) get_zeroed_page(GFP_ATOMIC);
320 if (address == NULL) 322 if (address == NULL)
@@ -363,7 +365,7 @@ zfcp_erp_adisc(struct zfcp_port *port)
363 retval = -ENOMEM; 365 retval = -ENOMEM;
364 freemem: 366 freemem:
365 if (address != NULL) 367 if (address != NULL)
366 __free_pages(send_els->req->page, 0); 368 __free_pages(sg_page(send_els->req), 0);
367 if (send_els != NULL) { 369 if (send_els != NULL) {
368 kfree(send_els->req); 370 kfree(send_els->req);
369 kfree(send_els->resp); 371 kfree(send_els->resp);
@@ -437,7 +439,7 @@ zfcp_erp_adisc_handler(unsigned long data)
437 439
438 out: 440 out:
439 zfcp_port_put(port); 441 zfcp_port_put(port);
440 __free_pages(send_els->req->page, 0); 442 __free_pages(sg_page(send_els->req), 0);
441 kfree(send_els->req); 443 kfree(send_els->req);
442 kfree(send_els->resp); 444 kfree(send_els->resp);
443 kfree(send_els); 445 kfree(send_els);