aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_ioctl.c')
-rw-r--r--drivers/scsi/scsi_ioctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c
index 0bba7d8eebb0..36e930066649 100644
--- a/drivers/scsi/scsi_ioctl.c
+++ b/drivers/scsi/scsi_ioctl.c
@@ -241,10 +241,9 @@ int scsi_ioctl_send_command(struct scsi_device *sdev,
241 buf_needed = (buf_needed + 511) & ~511; 241 buf_needed = (buf_needed + 511) & ~511;
242 if (buf_needed > MAX_BUF) 242 if (buf_needed > MAX_BUF)
243 buf_needed = MAX_BUF; 243 buf_needed = MAX_BUF;
244 buf = kmalloc(buf_needed, gfp_mask); 244 buf = kzalloc(buf_needed, gfp_mask);
245 if (!buf) 245 if (!buf)
246 return -ENOMEM; 246 return -ENOMEM;
247 memset(buf, 0, buf_needed);
248 if (inlen == 0) { 247 if (inlen == 0) {
249 data_direction = DMA_FROM_DEVICE; 248 data_direction = DMA_FROM_DEVICE;
250 } else if (outlen == 0 ) { 249 } else if (outlen == 0 ) {