From: Kevin Hilman Date: Mon, 18 Jul 2011 22:31:43 +0000 (-0700) Subject: OMAP3+: VP: update_errorgain(): return error if VP X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8798c4ab56d8f726092870cb2cf15c5a7a0a93bf;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git OMAP3+: VP: update_errorgain(): return error if VP Add check for valid VP in omap_vp_update_errorgain() Signed-off-by: Kevin Hilman --- diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c index 38076205312..29698acc2ae 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, { 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))