mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
driver: rknpu: Fix missing misc_deregister() on dma heap open failure
Signed-off-by: Shuangjie Lin <shuangjie.lin@rock-chips.com> Change-Id: I8e0f622cb5090b2eae0ac819b4bfb78e35ada261
This commit is contained in:
@@ -1451,6 +1451,7 @@ static int rknpu_probe(struct platform_device *pdev)
|
||||
rknpu_dev->heap = rk_dma_heap_find("rk-dma-heap-cma");
|
||||
if (!rknpu_dev->heap) {
|
||||
LOG_DEV_ERROR(dev, "failed to find cma heap\n");
|
||||
misc_deregister(&rknpu_dev->miscdev);
|
||||
return -ENOMEM;
|
||||
}
|
||||
rk_dma_heap_set_dev(dev);
|
||||
|
||||
Reference in New Issue
Block a user