ARM: omap: fix oops in arch/arm/mach-omap2/vp.c when pmic is not found
[deliverable/linux.git] / arch / arm / mach-omap2 / vp.c
index 807391d84a9dcd6aa394bb71b3729e97de542f67..0df88820978d5d509ded718d3311659e8ab079d4 100644 (file)
@@ -41,6 +41,11 @@ void __init omap_vp_init(struct voltagedomain *voltdm)
        u32 val, sys_clk_rate, timeout, waittime;
        u32 vddmin, vddmax, vstepmin, vstepmax;
 
+       if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) {
+               pr_err("%s: No PMIC info for vdd_%s\n", __func__, voltdm->name);
+               return;
+       }
+
        if (!voltdm->read || !voltdm->write) {
                pr_err("%s: No read/write API for accessing vdd_%s regs\n",
                        __func__, voltdm->name);
This page took 0.151714 seconds and 5 git commands to generate.