forked from Minki/linux
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
This commit is contained in:
parent
010681df65
commit
7eb89c17ab
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user