soc: qcom: smem_state: fix missing of_node_put in error path
commit70096b4990upstream. If of_parse_phandle_with_args() succeeds, the OF node reference should be dropped, regardless of number of phandle arguments. Cc: stable@vger.kernel.org Fixes:9460ae2ff3("soc: qcom: Introduce common SMEM state machine code") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20240822164853.231087-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
56eefe1f2f
commit
88792f3992
@@ -116,7 +116,8 @@ struct qcom_smem_state *qcom_smem_state_get(struct device *dev,
|
||||
|
||||
if (args.args_count != 1) {
|
||||
dev_err(dev, "invalid #qcom,smem-state-cells\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
state = ERR_PTR(-EINVAL);
|
||||
goto put;
|
||||
}
|
||||
|
||||
state = of_node_to_state(args.np);
|
||||
|
||||
Reference in New Issue
Block a user