diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-11-12 09:52:11 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-11-27 05:27:01 -0500 |
commit | 1de8e129f5e77e5eac6dc0a30df403404ddcd2b3 (patch) | |
tree | 1c50691285cd68796e06368d16e3dceb64163e92 /drivers/video | |
parent | 7e12be71fbad99efba4324843890d3b557dfc05c (diff) |
OMAPDSS: DPI: fix crash with dpi_verify_dsi_pll()
If the DSI support has not been compiled in or the SoC doesn't have DSI
hardware, dpi_get_dsidev() returns NULL. This NULL is passed to
dpi_verify_dsi_pll() causing a crash. The bug was added with commit
0e8276ef75f5c7811b038d1d23b2b42c16efc5ac (OMAPDSS: DPI: always use DSI
PLL if available).
Fix this by checking if dsidev is NULL before calling
dpi_verify_dsi_pll().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/omap2/dss/dpi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 1e103b3135b9..c109fa68c01d 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c | |||
@@ -412,7 +412,7 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev) | |||
412 | */ | 412 | */ |
413 | dsidev = dpi_get_dsidev(dssdev->channel); | 413 | dsidev = dpi_get_dsidev(dssdev->channel); |
414 | 414 | ||
415 | if (dpi_verify_dsi_pll(dsidev)) { | 415 | if (dsidev && dpi_verify_dsi_pll(dsidev)) { |
416 | dsidev = NULL; | 416 | dsidev = NULL; |
417 | DSSWARN("DSI PLL not operational\n"); | 417 | DSSWARN("DSI PLL not operational\n"); |
418 | } | 418 | } |