opp: Handle missing OPP table in dev_pm_opp_xlate_performance_state()
[linux-2.6-microblaze.git] / drivers / opp / core.c
index ce0ec5b..0417cd3 100644 (file)
@@ -2339,7 +2339,7 @@ int dev_pm_opp_xlate_performance_state(struct opp_table *src_table,
         * and so none of them have the "required-opps" property set. Return the
         * pstate of the src_table as it is in such cases.
         */
-       if (!src_table->required_opp_count)
+       if (!src_table || !src_table->required_opp_count)
                return pstate;
 
        for (i = 0; i < src_table->required_opp_count; i++) {