Merge drm/drm-next into drm-misc-next
[sfrench/cifs-2.6.git] / drivers / gpu / drm / panfrost / panfrost_devfreq.c
index 12ff77dacc9541fb3d7a1af3d9d3f0876f59d8b8..c1eb8cfe6aeb396c9e2176a81869724577bea2df 100644 (file)
@@ -53,8 +53,10 @@ static int panfrost_devfreq_target(struct device *dev, unsigned long *freq,
        if (err) {
                dev_err(dev, "Cannot set frequency %lu (%d)\n", target_rate,
                        err);
-               regulator_set_voltage(pfdev->regulator, pfdev->devfreq.cur_volt,
-                                     pfdev->devfreq.cur_volt);
+               if (pfdev->regulator)
+                       regulator_set_voltage(pfdev->regulator,
+                                             pfdev->devfreq.cur_volt,
+                                             pfdev->devfreq.cur_volt);
                return err;
        }