Skip to content

Commit

Permalink
remoteproc_virtio.c: fix rproc_virtio_negotiate_features return value
Browse files Browse the repository at this point in the history
Make rproc_virtio_negotiate_features() return the mask of features
successfully negotiated.

Signed-off-by: Yongrong Wang <[email protected]>
  • Loading branch information
wyr-7 authored and arnopo committed Oct 9, 2024
1 parent e7e7593 commit c31e4fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/remoteproc/remoteproc_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ static void rproc_virtio_set_features(struct virtio_device *vdev,
static uint32_t rproc_virtio_negotiate_features(struct virtio_device *vdev,
uint32_t features)
{
uint32_t dfeatures = rproc_virtio_get_dfeatures(vdev);
features = features & rproc_virtio_get_dfeatures(vdev);
rproc_virtio_set_features(vdev, features);

rproc_virtio_set_features(vdev, dfeatures & features);

return 0;
/* return the mask of features successfully negotiated */
return features;
}
#endif

Expand Down

0 comments on commit c31e4fd

Please sign in to comment.