summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2021-05-21 15:59:23 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-05-21 15:59:23 -0300
commitf248d687e99da6799a25bbf53ca1350b84d41077 (patch)
treeedb0b90c039e34e838329ca4d96e9888a4ebfa34 /drivers/dma
parent3b2f17ad1770e51b8b4e68b5069c4f1ee477eff8 (diff)
parent011ff616ffe8df6b86ee54d14a43c8d1a96a6325 (diff)
downloadlinux-f248d687e99da6799a25bbf53ca1350b84d41077.tar.gz
linux-f248d687e99da6799a25bbf53ca1350b84d41077.tar.bz2
linux-f248d687e99da6799a25bbf53ca1350b84d41077.zip
Merge remote-tracking branch 'torvalds/master' into perf/urgent
To pick up more UAPI updates to sync with tools/. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/qcom/hidma_mgmt.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/dma/qcom/hidma_mgmt.c b/drivers/dma/qcom/hidma_mgmt.c
index 806ca02c52d7..62026607f3f8 100644
--- a/drivers/dma/qcom/hidma_mgmt.c
+++ b/drivers/dma/qcom/hidma_mgmt.c
@@ -418,8 +418,23 @@ static int __init hidma_mgmt_init(void)
hidma_mgmt_of_populate_channels(child);
}
#endif
- return platform_driver_register(&hidma_mgmt_driver);
+ /*
+ * We do not check for return value here, as it is assumed that
+ * platform_driver_register must not fail. The reason for this is that
+ * the (potential) hidma_mgmt_of_populate_channels calls above are not
+ * cleaned up if it does fail, and to do this work is quite
+ * complicated. In particular, various calls of of_address_to_resource,
+ * of_irq_to_resource, platform_device_register_full, of_dma_configure,
+ * and of_msi_configure which then call other functions and so on, must
+ * be cleaned up - this is not a trivial exercise.
+ *
+ * Currently, this module is not intended to be unloaded, and there is
+ * no module_exit function defined which does the needed cleanup. For
+ * this reason, we have to assume success here.
+ */
+ platform_driver_register(&hidma_mgmt_driver);
+ return 0;
}
module_init(hidma_mgmt_init);
MODULE_LICENSE("GPL v2");