mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
remoteproc: fix the error check for idr_alloc
The new idr_alloc interface returns the allocated id back
on success, so fix the error path to check for negative
values. This was missed out in the newer idr interface
adoption patch, 15fc611 "remoteproc: convert to idr_alloc()".
Signed-off-by: Suman Anna <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Signed-off-by: Ohad Ben-Cohen <[email protected]>
This commit is contained in:
parent
f6161aa153
commit
b39599b7cb
1 changed files with 1 additions and 1 deletions
|
|
@ -217,7 +217,7 @@ int rproc_alloc_vring(struct rproc_vdev *rvdev, int i)
|
|||
* TODO: support predefined notifyids (via resource table)
|
||||
*/
|
||||
ret = idr_alloc(&rproc->notifyids, rvring, 0, 0, GFP_KERNEL);
|
||||
if (ret) {
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "idr_alloc failed: %d\n", ret);
|
||||
dma_free_coherent(dev->parent, size, va, dma);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue