Skip to content

Commit

Permalink
soc: qcom: ramp_controller: Fix an error handling path in qcom_ramp_c…
Browse files Browse the repository at this point in the history
…ontroller_probe()

[ Upstream commit b3d0dcc ]

'qrc' is known to be non-NULL at this point.
Checking for 'qrc->desc' was expected instead, so use it.

Fixes: a723c95 ("soc: qcom: Add Qualcomm Ramp Controller driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/84727a79d0261b4112411aec23b553504015c02c.1681684138.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tititiou36 authored and gregkh committed Jun 14, 2023
1 parent 71105f7 commit 4b6ff4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/soc/qcom/ramp_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ static int qcom_ramp_controller_probe(struct platform_device *pdev)
return -ENOMEM;

qrc->desc = device_get_match_data(&pdev->dev);
if (!qrc)
if (!qrc->desc)
return -EINVAL;

qrc->regmap = devm_regmap_init_mmio(&pdev->dev, base, &qrc_regmap_config);
Expand Down

0 comments on commit 4b6ff4a

Please sign in to comment.