summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-12-16 23:54:42 (GMT)
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-12-29 08:06:55 (GMT)
commit811174f45f5c586569f0574ef7ff8904d5b05420 (patch)
tree0b472e6af3cb4a6a2cf48f90c5da2fa31fa5e6bc /drivers/video
parent1616cf01a4455501836fee506ed340baa571b366 (diff)
downloadlinux-811174f45f5c586569f0574ef7ff8904d5b05420.tar.xz
OMAPDSS: pll: NULL dereference in error handling
The regulator_disable() doesn't accept NULL pointers. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/omap2/dss/pll.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/fbdev/omap2/dss/pll.c b/drivers/video/fbdev/omap2/dss/pll.c
index 50bc62c5..335ffac 100644
--- a/drivers/video/fbdev/omap2/dss/pll.c
+++ b/drivers/video/fbdev/omap2/dss/pll.c
@@ -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;