提交 c3bce9d5 编写于 作者: E Edgar E. Iglesias

etraxfs_dma: Dont forward zero-length payload to clients

Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
上级 586d1a99
......@@ -440,13 +440,16 @@ static int channel_out_run(struct fs_dma_ctrl *ctrl, int c)
D(printf("channel %d pushes %x %u bytes eop=%u\n", c,
saved_data_buf, len, out_eop));
if (ctrl->channels[c].client->client.push)
if (ctrl->channels[c].client->client.push) {
if (len > 0) {
ctrl->channels[c].client->client.push(
ctrl->channels[c].client->client.opaque,
buf, len, out_eop);
else
}
} else {
printf("WARNING: DMA ch%d dataloss,"
" no attached client.\n", c);
}
saved_data_buf += len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册