Skip to content

Commit

Permalink
OMAPDSS: DPI: fix crash with dpi_verify_dsi_pll()
Browse files Browse the repository at this point in the history
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
0e8276e (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>
  • Loading branch information
Tomi Valkeinen committed Nov 27, 2012
1 parent 7e12be7 commit 1de8e12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/omap2/dss/dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
*/
dsidev = dpi_get_dsidev(dssdev->channel);

if (dpi_verify_dsi_pll(dsidev)) {
if (dsidev && dpi_verify_dsi_pll(dsidev)) {
dsidev = NULL;
DSSWARN("DSI PLL not operational\n");
}
Expand Down

0 comments on commit 1de8e12

Please sign in to comment.