summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2010-08-19 12:02:21 +0800
committerJiri Kosina <jkosina@suse.cz>2010-08-19 10:54:55 +0200
commit08ff45ca60e4bc1cc27a71a9fe06886e870aa7d8 (patch)
treee00a0f141cf5396317c1340ddebe396159c9122c
parent415b54e37a5d0efa7ff5d4d12285b1e82d574c3e (diff)
downloadlinux-08ff45ca60e4bc1cc27a71a9fe06886e870aa7d8.tar.bz2
Use kzalloc in idedisk_prep_fn.
Signed-off-by: Tao Ma <tao.ma@oracle.com> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/ide/ide-disk.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 7433e07de30e..471bb0d42eb0 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -435,12 +435,11 @@ static int idedisk_prep_fn(struct request_queue *q, struct request *rq)
if (!(rq->cmd_flags & REQ_FLUSH))
return BLKPREP_OK;
- cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC);
+ cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
/* FIXME: map struct ide_taskfile on rq->cmd[] */
BUG_ON(cmd == NULL);
- memset(cmd, 0, sizeof(*cmd));
if (ata_id_flush_ext_enabled(drive->id) &&
(drive->capacity64 >= (1UL << 28)))
cmd->tf.command = ATA_CMD_FLUSH_EXT;