From: Tejun Heo Date: Mon, 20 Feb 2006 14:48:38 +0000 (+0900) Subject: [PATCH] libata: fix qc->n_elem == 0 case handling in ata_qc_next_sg X-Git-Tag: v2.6.16-rc5~67^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc1887f3d8ae8ea61efa1a75af8ec0467b9dd546;p=pandora-kernel.git [PATCH] libata: fix qc->n_elem == 0 case handling in ata_qc_next_sg This patch makes ata_for_each_sg() start with pad_sgent when qc->n_elem is zero. Previously, ata_for_each_sg() unconditionally started with qc->__sg, handling the first sg to fill_sg() routines even when the entry was invalid. And while at it, unwind ?: in ata_qc_next_sg() into if statement. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- Reading git-diff-tree failed