aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe JAILLET <[email protected]>2023-04-17 00:29:35 +0200
committerBjorn Andersson <[email protected]>2023-05-24 20:02:10 -0700
commitb3d0dcc8e359cf5d57fb6308bc9750af5da574b3 (patch)
tree02c193f1a23833bfd9eccd5d336efe148775cc97
parent3395d36e6805786c26d13188735bc796b9d7a7c9 (diff)
soc: qcom: ramp_controller: Fix an error handling path in qcom_ramp_controller_probe()
'qrc' is known to be non-NULL at this point. Checking for 'qrc->desc' was expected instead, so use it. Fixes: a723c95fa137 ("soc: qcom: Add Qualcomm Ramp Controller driver") Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/84727a79d0261b4112411aec23b553504015c02c.1681684138.git.christophe.jaillet@wanadoo.fr
-rw-r--r--drivers/soc/qcom/ramp_controller.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/qcom/ramp_controller.c b/drivers/soc/qcom/ramp_controller.c
index dc74d2a19de2..5e3ba0be0903 100644
--- a/drivers/soc/qcom/ramp_controller.c
+++ b/drivers/soc/qcom/ramp_controller.c
@@ -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);