aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sr_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sr_ioctl.c')
-rw-r--r--drivers/scsi/sr_ioctl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c
index 3471be05779a..82d68fdb1548 100644
--- a/drivers/scsi/sr_ioctl.c
+++ b/drivers/scsi/sr_ioctl.c
@@ -281,6 +281,9 @@ int sr_get_mcn(struct cdrom_device_info *cdi, struct cdrom_mcn *mcn)
281 char *buffer = kmalloc(32, GFP_KERNEL | SR_GFP_DMA(cd)); 281 char *buffer = kmalloc(32, GFP_KERNEL | SR_GFP_DMA(cd));
282 int result; 282 int result;
283 283
284 if (!buffer)
285 return -ENOMEM;
286
284 memset(&cgc, 0, sizeof(struct packet_command)); 287 memset(&cgc, 0, sizeof(struct packet_command));
285 cgc.cmd[0] = GPCMD_READ_SUBCHANNEL; 288 cgc.cmd[0] = GPCMD_READ_SUBCHANNEL;
286 cgc.cmd[2] = 0x40; /* I do want the subchannel info */ 289 cgc.cmd[2] = 0x40; /* I do want the subchannel info */