aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-sbp2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/fw-sbp2.c')
-rw-r--r--drivers/firewire/fw-sbp2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 212674d723e3..c7518ea4c8ee 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -937,6 +937,11 @@ static int sbp2_command_orb_map_scatterlist(struct sbp2_command_orb *orb)
937 sg_len = sg_dma_len(sg + i); 937 sg_len = sg_dma_len(sg + i);
938 sg_addr = sg_dma_address(sg + i); 938 sg_addr = sg_dma_address(sg + i);
939 while (sg_len) { 939 while (sg_len) {
940 /* FIXME: This won't get us out of the pinch. */
941 if (unlikely(j >= ARRAY_SIZE(orb->page_table))) {
942 fw_error("page table overflow\n");
943 goto fail_page_table;
944 }
940 l = min(sg_len, SBP2_MAX_SG_ELEMENT_LENGTH); 945 l = min(sg_len, SBP2_MAX_SG_ELEMENT_LENGTH);
941 orb->page_table[j].low = sg_addr; 946 orb->page_table[j].low = sg_addr;
942 orb->page_table[j].high = (l << 16); 947 orb->page_table[j].high = (l << 16);