aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/block/dasd.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index dfe542b206cc..0eab05a37e65 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -542,9 +542,8 @@ dasd_kmalloc_request(char *magic, int cplength, int datasize,
542 struct dasd_ccw_req *cqr; 542 struct dasd_ccw_req *cqr;
543 543
544 /* Sanity checks */ 544 /* Sanity checks */
545 if ( magic == NULL || datasize > PAGE_SIZE || 545 BUG_ON( magic == NULL || datasize > PAGE_SIZE ||
546 (cplength*sizeof(struct ccw1)) > PAGE_SIZE) 546 (cplength*sizeof(struct ccw1)) > PAGE_SIZE);
547 BUG();
548 547
549 cqr = kzalloc(sizeof(struct dasd_ccw_req), GFP_ATOMIC); 548 cqr = kzalloc(sizeof(struct dasd_ccw_req), GFP_ATOMIC);
550 if (cqr == NULL) 549 if (cqr == NULL)
@@ -584,9 +583,8 @@ dasd_smalloc_request(char *magic, int cplength, int datasize,
584 int size; 583 int size;
585 584
586 /* Sanity checks */ 585 /* Sanity checks */
587 if ( magic == NULL || datasize > PAGE_SIZE || 586 BUG_ON( magic == NULL || datasize > PAGE_SIZE ||
588 (cplength*sizeof(struct ccw1)) > PAGE_SIZE) 587 (cplength*sizeof(struct ccw1)) > PAGE_SIZE);
589 BUG();
590 588
591 size = (sizeof(struct dasd_ccw_req) + 7L) & -8L; 589 size = (sizeof(struct dasd_ccw_req) + 7L) & -8L;
592 if (cplength > 0) 590 if (cplength > 0)