summaryrefslogtreecommitdiff
path: root/drivers/pmdomain/arm/scmi_perf_domain.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pmdomain/arm/scmi_perf_domain.c')
-rw-r--r--drivers/pmdomain/arm/scmi_perf_domain.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pmdomain/arm/scmi_perf_domain.c b/drivers/pmdomain/arm/scmi_perf_domain.c
index 709bbc448fad..d7ef46ccd9b8 100644
--- a/drivers/pmdomain/arm/scmi_perf_domain.c
+++ b/drivers/pmdomain/arm/scmi_perf_domain.c
@@ -159,6 +159,9 @@ static void scmi_perf_domain_remove(struct scmi_device *sdev)
struct genpd_onecell_data *scmi_pd_data = dev_get_drvdata(dev);
int i;
+ if (!scmi_pd_data)
+ return;
+
of_genpd_del_provider(dev->of_node);
for (i = 0; i < scmi_pd_data->num_domains; i++)