OMAP3+: VP: update_errorgain(): return error if VP
authorKevin Hilman <khilman@ti.com>
Mon, 18 Jul 2011 22:31:43 +0000 (15:31 -0700)
committerKevin Hilman <khilman@ti.com>
Thu, 15 Sep 2011 19:09:08 +0000 (12:09 -0700)
Add check for valid VP in omap_vp_update_errorgain()

Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/vp.c

index 38076205312e2acce8a2698fc98d4e05bf5c7e3a..29698acc2aeaf1e9fa4fb386dd6be9ed16e7cc10 100644 (file)
@@ -103,6 +103,9 @@ int omap_vp_update_errorgain(struct voltagedomain *voltdm,
 {
        struct omap_volt_data *volt_data;
 
+       if (!voltdm->vp)
+               return -EINVAL;
+
        /* Get volt_data corresponding to target_volt */
        volt_data = omap_voltage_get_voltdata(voltdm, target_volt);
        if (IS_ERR(volt_data))