diff options
author | Kevin Hilman <khilman@ti.com> | 2011-07-18 18:31:43 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-09-15 15:09:08 -0400 |
commit | 8798c4ab56d8f726092870cb2cf15c5a7a0a93bf (patch) | |
tree | 734f2715ef5d0e41f9a5a4162e1a33ee99dd825a /arch/arm/mach-omap2/vp.c | |
parent | bea30ed65fb2432097f362ce17042e22febcb616 (diff) |
OMAP3+: VP: update_errorgain(): return error if VP
Add check for valid VP in omap_vp_update_errorgain()
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/vp.c')
-rw-r--r-- | arch/arm/mach-omap2/vp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c index 38076205312e..29698acc2aea 100644 --- a/arch/arm/mach-omap2/vp.c +++ b/arch/arm/mach-omap2/vp.c | |||
@@ -103,6 +103,9 @@ int omap_vp_update_errorgain(struct voltagedomain *voltdm, | |||
103 | { | 103 | { |
104 | struct omap_volt_data *volt_data; | 104 | struct omap_volt_data *volt_data; |
105 | 105 | ||
106 | if (!voltdm->vp) | ||
107 | return -EINVAL; | ||
108 | |||
106 | /* Get volt_data corresponding to target_volt */ | 109 | /* Get volt_data corresponding to target_volt */ |
107 | volt_data = omap_voltage_get_voltdata(voltdm, target_volt); | 110 | volt_data = omap_voltage_get_voltdata(voltdm, target_volt); |
108 | if (IS_ERR(volt_data)) | 111 | if (IS_ERR(volt_data)) |