Skip to content

Commit

Permalink
remoteproc_virtio: fix vrings_info structure init
Browse files Browse the repository at this point in the history
Only the first index of the vring_info is set to 0.
Apply the memset to the whole memory allocated.

Signed-off-by: Arnaud Pouliquen <[email protected]>
  • Loading branch information
arnopo committed Feb 8, 2024
1 parent b32187e commit 0e24419
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/remoteproc/remoteproc_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ rproc_virtio_create_vdev(unsigned int role, unsigned int notifyid,
if (!vrings_info)
goto err0;
memset(rpvdev, 0, sizeof(*rpvdev));
memset(vrings_info, 0, sizeof(*vrings_info));
memset(vrings_info, 0, sizeof(*vrings_info) * num_vrings);
vdev = &rpvdev->vdev;

for (i = 0; i < num_vrings; i++) {
Expand Down

0 comments on commit 0e24419

Please sign in to comment.