diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-06-07 11:16:22 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-06-07 11:16:22 +0100 |
commit | b187e2b53055007fa08ccb9fb120578bae0d02f3 (patch) | |
tree | 72e678b23382c1b754b5bf72de8c9a63b7f4048c /hw | |
parent | 8b3e9ca74c989859d7e6a3804b141d6c3645e5a2 (diff) | |
parent | 6701e5514beab7b781a10424a94e9850c707287c (diff) | |
download | qemu-b187e2b53055007fa08ccb9fb120578bae0d02f3.zip qemu-b187e2b53055007fa08ccb9fb120578bae0d02f3.tar.gz qemu-b187e2b53055007fa08ccb9fb120578bae0d02f3.tar.bz2 |
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
# gpg: Signature made Wed 07 Jun 2017 04:29:20 BST
# gpg: using RSA key 0xEF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211
* remotes/jasowang/tags/net-pull-request:
Revert "Change net/socket.c to use socket_*() functions" again
net/rocker: Cleanup the useless return value check
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/net/rocker/rocker.c | 9 | ||||
-rw-r--r-- | hw/net/rocker/rocker_desc.c | 4 |
2 files changed, 4 insertions, 9 deletions
diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c index 6e70fdd..4f0f6d7 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++) { diff --git a/hw/net/rocker/rocker_desc.c b/hw/net/rocker/rocker_desc.c index ac02797..6184c40 100644 --- a/hw/net/rocker/rocker_desc.c +++ b/hw/net/rocker/rocker_desc.c @@ -69,9 +69,7 @@ char *desc_get_buf(DescInfo *info, bool read_only) return NULL; } - if (pci_dma_read(dev, le64_to_cpu(info->desc.buf_addr), info->buf, size)) { - return NULL; - } + pci_dma_read(dev, le64_to_cpu(info->desc.buf_addr), info->buf, size); return info->buf; } |