Skip to content

Commit

Permalink
staging: drm/imx: check return value of ipu_reset()
Browse files Browse the repository at this point in the history
ipu_reset() can fail with a timeout. Check the return value and act
appropriately.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Lothar Waßmann authored and Greg Kroah-Hartman committed Jan 7, 2013
1 parent 412fc87 commit 4d27b2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/staging/imx-drm/ipu-v3/ipu-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,9 @@ static int ipu_probe(struct platform_device *pdev)
if (ret)
goto out_failed_irq;

ipu_reset(ipu);
ret = ipu_reset(ipu);
if (ret)
goto out_failed_reset;

/* Set MCU_T to divide MCU access window into 2 */
ipu_cm_write(ipu, 0x00400000L | (IPU_MCU_T_DEFAULT << 18),
Expand All @@ -1129,6 +1131,7 @@ static int ipu_probe(struct platform_device *pdev)
ipu_submodules_exit(ipu);
failed_submodules_init:
ipu_irq_exit(ipu);
out_failed_reset:
out_failed_irq:
clk_disable_unprepare(ipu->clk);
failed_clk_get:
Expand Down

0 comments on commit 4d27b2c

Please sign in to comment.