diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 877df33e0246..7f51c5fc8194 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -2045,7 +2045,7 @@ static int qcom_spmi_regulator_probe(struct platform_device *pdev) } } - if (vreg->set_points->count == 1) { + if (vreg->set_points && vreg->set_points->count == 1) { /* since there is only one range */ range = vreg->set_points->range; vreg->desc.uV_step = range->step_uV;