summaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorJinpeng Cui <cui.jinpeng2@zte.com.cn>2022-08-23 13:36:20 +0000
committerBjorn Andersson <andersson@kernel.org>2022-08-29 17:30:27 -0500
commit7eb89c17abd2574f627c1277a15f6ff64bec33a4 (patch)
treed1729748ba455841c4717f385e3a2c7f62d215d8 /drivers/soc
parent010681df652878e929d46faede31acdd085dd6fd (diff)
downloadlinux-stable-7eb89c17abd2574f627c1277a15f6ff64bec33a4.tar.gz
linux-stable-7eb89c17abd2574f627c1277a15f6ff64bec33a4.tar.bz2
linux-stable-7eb89c17abd2574f627c1277a15f6ff64bec33a4.zip
soc: qcom: icc-bwmon: remove redundant ret variable
Return value from devm_regmap_field_bulk_alloc() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20220823133620.211902-1-cui.jinpeng2@zte.com.cn
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/icc-bwmon.c6
1 files 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)