Skip to content

Commit

Permalink
soc: qcom: rmtfs: Fix error code in probe()
Browse files Browse the repository at this point in the history
[ Upstream commit 7b374a2 ]

Return an error code if of_property_count_u32_elems() fails.  Don't
return success.

Fixes: e656cd0 ("soc: qcom: rmtfs: Optionally map RMTFS to more VMs")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/76b21a14-70ff-4ca9-927d-587543c6699c@kili.mountain
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Dan Carpenter authored and gregkh committed Jun 14, 2023
1 parent 4b6ff4a commit df7c6db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/soc/qcom/rmtfs_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ static int qcom_rmtfs_mem_probe(struct platform_device *pdev)
num_vmids = 0;
} else if (num_vmids < 0) {
dev_err(&pdev->dev, "failed to count qcom,vmid elements: %d\n", num_vmids);
ret = num_vmids;
goto remove_cdev;
} else if (num_vmids > NUM_MAX_VMIDS) {
dev_warn(&pdev->dev,
Expand Down

0 comments on commit df7c6db

Please sign in to comment.