diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/scsi_ioctl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index a26ba07955fe..71bdf88884b2 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -436,11 +436,10 @@ int sg_scsi_ioctl(struct file *file, struct request_queue *q, bytes = max(in_len, out_len); if (bytes) { - buffer = kmalloc(bytes, q->bounce_gfp | GFP_USER| __GFP_NOWARN); + buffer = kzalloc(bytes, q->bounce_gfp | GFP_USER| __GFP_NOWARN); if (!buffer) return -ENOMEM; - memset(buffer, 0, bytes); } rq = blk_get_request(q, in_len ? WRITE : READ, __GFP_WAIT); |