[PATCH -next] interconnect: simplify the return expression of imx_icc_unregister

Liu Shixin liushixin2 at huawei.com
Mon Sep 21 04:24:37 EDT 2020


Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2 at huawei.com>
---
 drivers/interconnect/imx/imx.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c
index ac420f86008e..40fa22a32a60 100644
--- a/drivers/interconnect/imx/imx.c
+++ b/drivers/interconnect/imx/imx.c
@@ -269,15 +269,10 @@ EXPORT_SYMBOL_GPL(imx_icc_register);
 int imx_icc_unregister(struct platform_device *pdev)
 {
 	struct icc_provider *provider = platform_get_drvdata(pdev);
-	int ret;
 
 	imx_icc_unregister_nodes(provider);
 
-	ret = icc_provider_del(provider);
-	if (ret)
-		return ret;
-
-	return 0;
+	return icc_provider_del(provider);
 }
 EXPORT_SYMBOL_GPL(imx_icc_unregister);
 
-- 
2.25.1




More information about the linux-arm-kernel mailing list