Skip to content

Commit

Permalink
soc: qcom: icc-bwmon: remove redundant ret variable
Browse files Browse the repository at this point in the history
Return value from devm_regmap_field_bulk_alloc() directly
instead of taking this in another redundant variable.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Jinpeng Cui <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Jinpeng Cui authored and andersson committed Aug 29, 2022
1 parent 010681d commit 7eb89c1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/soc/qcom/icc-bwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)
Expand Down

0 comments on commit 7eb89c1

Please sign in to comment.