mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
remoteproc: fix error path of handle_vdev
Remove the vdev entry from the list before freeing it, otherwise rproc->vdevs will explode. Cc: [email protected] Signed-off-by: Sjur Brændeland <[email protected]> Acked-by: Ido Yariv <[email protected]> [edit subject, minor commit log edit, cc stable] Signed-off-by: Ohad Ben-Cohen <[email protected]>
This commit is contained in:
parent
1cd425b660
commit
cde42e076c
1 changed files with 3 additions and 1 deletions
|
|
@ -366,10 +366,12 @@ static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc,
|
|||
/* it is now safe to add the virtio device */
|
||||
ret = rproc_add_virtio_dev(rvdev, rsc->id);
|
||||
if (ret)
|
||||
goto free_rvdev;
|
||||
goto remove_rvdev;
|
||||
|
||||
return 0;
|
||||
|
||||
remove_rvdev:
|
||||
list_del(&rvdev->node);
|
||||
free_rvdev:
|
||||
kfree(rvdev);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue