From: Brian King Date: Wed, 17 Jan 2007 18:32:28 +0000 (-0600) Subject: libata: Initialize qc->pad_len X-Git-Tag: v2.6.20-rc6~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0f29485686d9d1c4f31240953a742d5dd4fdb72;p=linux-2.6 libata: Initialize qc->pad_len 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 Signed-off-by: Jeff Garzik --- diff --git a/include/linux/libata.h b/include/linux/libata.h index 65d318746a..f7f268e387 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -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);