I don't understand the function qset_add_urb_sg. As far as I can tell, the variable std is NULL until reaching the following code: if (!std || (prev_end & (WHCI_PAGE_SIZE-1)) || (dma_addr & (WHCI_PAGE_SIZE-1)) || std->len + WHCI_PAGE_SIZE > QTD_MAX_XFER_SIZE) { if (std->len % qset->max_packet != 0) return -EINVAL; std = qset_new_std(whc, qset, urb, mem_flags); if (std == NULL) { return -ENOMEM; } ntds++; p = 0; } The it crashes on the first inner if. Indeed, it seems that the only way the function can work is if remaining is 0, in which case the entire for_each_sg is useless. But perhaps I am missing something? julia -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html