diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-05-21 15:59:23 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-05-21 15:59:23 -0300 |
commit | f248d687e99da6799a25bbf53ca1350b84d41077 (patch) | |
tree | edb0b90c039e34e838329ca4d96e9888a4ebfa34 /drivers/dma | |
parent | 3b2f17ad1770e51b8b4e68b5069c4f1ee477eff8 (diff) | |
parent | 011ff616ffe8df6b86ee54d14a43c8d1a96a6325 (diff) | |
download | linux-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.c | 17 |
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"); |