lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220823133620.211902-1-cui.jinpeng2@zte.com.cn>
Date:   Tue, 23 Aug 2022 13:36:20 +0000
From:   cgel.zte@...il.com
To:     krzysztof.kozlowski@...aro.org
Cc:     agross@...nel.org, bjorn.andersson@...aro.org,
        konrad.dybcio@...ainline.org, linux-arm-msm@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Jinpeng Cui <cui.jinpeng2@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] soc: qcom: icc-bwmon: remove redundant ret variable

From: Jinpeng Cui <cui.jinpeng2@....com.cn>

Return value from devm_regmap_field_bulk_alloc() directly
instead of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@....com.cn>
---
 drivers/soc/qcom/icc-bwmon.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
index 47c2c3e7bb3f..9df47afb0d81 100644
--- a/drivers/soc/qcom/icc-bwmon.c
+++ b/drivers/soc/qcom/icc-bwmon.c
@@ -551,7 +551,6 @@ static int bwmon_init_regmap(struct platform_device *pdev,
 	struct device *dev = &pdev->dev;
 	void __iomem *base;
 	struct regmap *map;
-	int ret;
 
 	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
@@ -565,11 +564,10 @@ static int bwmon_init_regmap(struct platform_device *pdev,
 
 	BUILD_BUG_ON(ARRAY_SIZE(msm8998_bwmon_reg_fields) != F_NUM_FIELDS);
 	BUILD_BUG_ON(ARRAY_SIZE(sdm845_llcc_bwmon_reg_fields) != F_NUM_FIELDS);
-	ret = devm_regmap_field_bulk_alloc(dev, map, bwmon->regs,
+
+	return devm_regmap_field_bulk_alloc(dev, map, bwmon->regs,
 					   bwmon->data->regmap_fields,
 					   F_NUM_FIELDS);
-
-	return ret;
 }
 
 static int bwmon_probe(struct platform_device *pdev)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ