diff options
| -rw-r--r-- | drivers/rpmsg/virtio_rpmsg_bus.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index 1859f71372e2..027096fe6a12 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c | |||
| @@ -764,7 +764,7 @@ int rpmsg_send_offchannel_raw(struct rpmsg_channel *rpdev, u32 src, u32 dst, | |||
| 764 | 764 | ||
| 765 | /* add message to the remote processor's virtqueue */ | 765 | /* add message to the remote processor's virtqueue */ |
| 766 | err = virtqueue_add_buf(vrp->svq, &sg, 1, 0, msg, GFP_KERNEL); | 766 | err = virtqueue_add_buf(vrp->svq, &sg, 1, 0, msg, GFP_KERNEL); |
| 767 | if (err < 0) { | 767 | if (err) { |
| 768 | /* | 768 | /* |
| 769 | * need to reclaim the buffer here, otherwise it's lost | 769 | * need to reclaim the buffer here, otherwise it's lost |
| 770 | * (memory won't leak, but rpmsg won't use it again for TX). | 770 | * (memory won't leak, but rpmsg won't use it again for TX). |
| @@ -776,8 +776,6 @@ int rpmsg_send_offchannel_raw(struct rpmsg_channel *rpdev, u32 src, u32 dst, | |||
| 776 | 776 | ||
| 777 | /* tell the remote processor it has a pending message to read */ | 777 | /* tell the remote processor it has a pending message to read */ |
| 778 | virtqueue_kick(vrp->svq); | 778 | virtqueue_kick(vrp->svq); |
| 779 | |||
| 780 | err = 0; | ||
| 781 | out: | 779 | out: |
| 782 | mutex_unlock(&vrp->tx_lock); | 780 | mutex_unlock(&vrp->tx_lock); |
| 783 | return err; | 781 | return err; |
| @@ -980,7 +978,7 @@ static int rpmsg_probe(struct virtio_device *vdev) | |||
| 980 | 978 | ||
| 981 | err = virtqueue_add_buf(vrp->rvq, &sg, 0, 1, cpu_addr, | 979 | err = virtqueue_add_buf(vrp->rvq, &sg, 0, 1, cpu_addr, |
| 982 | GFP_KERNEL); | 980 | GFP_KERNEL); |
| 983 | WARN_ON(err < 0); /* sanity check; this can't really happen */ | 981 | WARN_ON(err); /* sanity check; this can't really happen */ |
| 984 | } | 982 | } |
| 985 | 983 | ||
| 986 | /* suppress "tx-complete" interrupts */ | 984 | /* suppress "tx-complete" interrupts */ |
