diff options
author | Mao Zhongyi <maozy.fnst@cn.fujitsu.com> | 2017-05-24 10:57:18 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2017-06-07 10:58:31 +0800 |
commit | 4cee3cf35c05c863f5acf87af915298c752eefd9 (patch) | |
tree | d52cc7cbd513b23c23a268da4cc0520f765cac15 /hw/net/rocker/rocker.c | |
parent | 199e19ee538eb61fd08b1c1ee5aa838ebdcc968e (diff) |
net/rocker: Cleanup the useless return value check
None of pci_dma_read()'s callers check the return value except
rocker. There is no need to check it because it always return
0. So the check work is useless. Remove it entirely.
Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Mao Zhongyi <maozy.fnst@cn.fujitsu.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/rocker/rocker.c')
-rw-r--r-- | hw/net/rocker/rocker.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c index 6e70fddee3..4f0f6d71e5 100644 --- a/hw/net/rocker/rocker.c +++ b/hw/net/rocker/rocker.c @@ -244,11 +244,9 @@ static int tx_consume(Rocker *r, DescInfo *info) goto err_no_mem; } - if (pci_dma_read(dev, frag_addr, iov[iovcnt].iov_base, - iov[iovcnt].iov_len)) { - err = -ROCKER_ENXIO; - goto err_bad_io; - } + pci_dma_read(dev, frag_addr, iov[iovcnt].iov_base, + iov[iovcnt].iov_len); + iovcnt++; } @@ -261,7 +259,6 @@ static int tx_consume(Rocker *r, DescInfo *info) err = fp_port_eg(r->fp_port[port], iov, iovcnt); err_too_many_frags: -err_bad_io: err_no_mem: err_bad_attr: for (i = 0; i < ROCKER_TX_FRAGS_MAX; i++) { |