dmaengine: qcom_hidma: Check for driver register failure
authorAditya Pakki <pakki001@umn.edu>
Fri, 28 Dec 2018 20:11:19 +0000 (14:11 -0600)
committerVinod Koul <vkoul@kernel.org>
Mon, 7 Jan 2019 04:20:39 +0000 (09:50 +0530)
While initializing the driver, the function platform_driver_register can
fail and return an error. Consistent with other invocations, this patch
returns the error upstream.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Acked-by: Sinan Kaya <okaya@kernel.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/qcom/hidma_mgmt.c

index d64edeb..681de12 100644 (file)
@@ -423,9 +423,8 @@ static int __init hidma_mgmt_init(void)
                hidma_mgmt_of_populate_channels(child);
        }
 #endif
-       platform_driver_register(&hidma_mgmt_driver);
+       return platform_driver_register(&hidma_mgmt_driver);
 
-       return 0;
 }
 module_init(hidma_mgmt_init);
 MODULE_LICENSE("GPL v2");