From: Stefan Weinhuber Date: Thu, 29 Jun 2006 12:57:46 +0000 (+0200) Subject: [S390] missing check in dasd_eer_open. X-Git-Tag: v2.6.18-rc1~360^2~17 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f45a43d847c96949d22e702879e52385a1547f6b;p=linux-2.6 [S390] missing check in dasd_eer_open. Check the return value of kzalloc in dasd_eer_open. Signed-off-by: Stefan Weinhuber Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c index 2d8af70994..9d574ede1b 100644 --- a/drivers/s390/block/dasd_eer.c +++ b/drivers/s390/block/dasd_eer.c @@ -521,6 +521,8 @@ static int dasd_eer_open(struct inode *inp, struct file *filp) unsigned long flags; eerb = kzalloc(sizeof(struct eerbuffer), GFP_KERNEL); + if (!eerb) + return -ENOMEM; eerb->buffer_page_count = eer_pages; if (eerb->buffer_page_count < 1 || eerb->buffer_page_count > INT_MAX / PAGE_SIZE) {