瀏覽代碼

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 <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Brian King 18 年之前
父節點
當前提交
d0f2948568
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      include/linux/libata.h

+ 1 - 0
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);