Thread (2 messages) flat view 2 messages, 2 authors, 2014-12-17
STALE4257d

[patch] OMAPDSS: pll: NULL dereference in error handling

From: Dan Carpenter <hidden>
Date: 2014-12-16 23:54:42
Also in: kernel-janitors, linux-omap
Subsystem: framebuffer layer, omap display subsystem and framebuffer support (dss2), the rest · Maintainers: Helge Deller, Linus Torvalds

The regulator_disable() doesn't accept NULL pointers.

Signed-off-by: Dan Carpenter <redacted>
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;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help