Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08ff45ca authored by Tao Ma's avatar Tao Ma Committed by Jiri Kosina
Browse files

Use kzalloc in idedisk_prep_fn.



Signed-off-by: default avatarTao Ma <tao.ma@oracle.com>
Acked-by: default avatarJeff Garzik <jgarzik@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 415b54e3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;