Skip to content

Commit

Permalink
Use kzalloc in idedisk_prep_fn.
Browse files Browse the repository at this point in the history
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Tao Ma authored and Jiri Kosina committed Aug 19, 2010
1 parent 415b54e commit 08ff45c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 08ff45c

Please sign in to comment.