I noticed a case in sr_ioctl.c's sr_get_mcn where a buffer is
allocated, but the pointer isn't checked for null.
Signed-off-by: Nate Dailey <nate.dailey@stratus.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
char *buffer = kmalloc(32, GFP_KERNEL | SR_GFP_DMA(cd));
int result;
+ if (!buffer)
+ return -ENOMEM;
+
memset(&cgc, 0, sizeof(struct packet_command));
cgc.cmd[0] = GPCMD_READ_SUBCHANNEL;
cgc.cmd[2] = 0x40; /* I do want the subchannel info */