OMAPDSS: pll: NULL dereference in error handling

The regulator_disable() doesn't accept NULL pointers.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
This commit is contained in:
Dan Carpenter 2014-12-17 02:54:42 +03:00 • committed by Tomi Valkeinen
commit 811174f45f

View file

@ -97,7 +97,8 @@ int dss_pll_enable(struct dss_pll *pll)
return 0;
err_enable:
regulator_disable(pll->regulator);
if (pll->regulator)
regulator_disable(pll->regulator);
err_reg:
clk_disable_unprepare(pll->clkin);
return r;