Skip to content

Commit b3d0dcc

Browse files
tititiou36andersson
authored andcommitted
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: a723c95 ("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
1 parent 3395d36 commit b3d0dcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/qcom/ramp_controller.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ static int qcom_ramp_controller_probe(struct platform_device *pdev)
296296
return -ENOMEM;
297297

298298
qrc->desc = device_get_match_data(&pdev->dev);
299-
if (!qrc)
299+
if (!qrc->desc)
300300
return -EINVAL;
301301

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

0 commit comments

Comments
 (0)