Skip to content

Commit

Permalink
libata: Initialize qc->pad_len
Browse files Browse the repository at this point in the history
Initialize qc->pad_len for each new command. This ensures
that pad_len is not set to a stale value for zero data
length commands.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Brian King authored and Jeff Garzik committed Jan 24, 2007
1 parent 7a80118 commit d0f2948
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,7 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
qc->nbytes = qc->curbytes = 0;
qc->n_elem = 0;
qc->err_mask = 0;
qc->pad_len = 0;

ata_tf_init(qc->dev, &qc->tf);

Expand Down

0 comments on commit d0f2948

Please sign in to comment.