
From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>


Signed-off-by:  Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/scsi/sr_ioctl.c |    3 +++
 1 files changed, 3 insertions(+)

diff -puN drivers/scsi/sr_ioctl.c~sr_ioctl-kmalloc-fix drivers/scsi/sr_ioctl.c
--- 25/drivers/scsi/sr_ioctl.c~sr_ioctl-kmalloc-fix	Wed May 26 16:03:15 2004
+++ 25-akpm/drivers/scsi/sr_ioctl.c	Wed May 26 16:03:15 2004
@@ -331,6 +331,9 @@ int sr_audio_ioctl(struct cdrom_device_i
 	int result;
 	unsigned char *buffer = kmalloc(32, GFP_KERNEL | SR_GFP_DMA(cd));
 
+	if (!buffer)
+		return -ENOMEM;
+
 	memset(&cgc, 0, sizeof(struct cdrom_generic_command));
 	cgc.timeout = IOCTL_TIMEOUT;
 
_
