mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Lothar Waßmann" <LW@KARO-electronics.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] staging: drm/imx: check return value of ipu_reset()
Date: Thu, 27 Dec 2012 11:06:51 +0100	[thread overview]
Message-ID: <20121227100651.GT26326@pengutronix.de> (raw)
In-Reply-To: <56060bcfc2aa06b884380d07af72fc5db6ef9685.1356447103.git.LW@KARO-electronics.de>

On Tue, Dec 25, 2012 at 03:58:37PM +0100, Lothar Waßmann wrote:
> ipu_reset() can fail with a timeout. Check the return value and act
> appropriately.
> 
> Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>

All:

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

> ---
>  drivers/staging/imx-drm/ipu-v3/ipu-common.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common.c b/drivers/staging/imx-drm/ipu-v3/ipu-common.c
> index 677e665..f7059cd 100644
> --- a/drivers/staging/imx-drm/ipu-v3/ipu-common.c
> +++ b/drivers/staging/imx-drm/ipu-v3/ipu-common.c
> @@ -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),
> @@ -1129,6 +1131,7 @@ failed_add_clients:
>  	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:
> -- 
> 1.7.2.5
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

      parent reply	other threads:[~2012-12-27 10:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-25 14:58 Lothar Waßmann
2012-12-25 14:58 ` [PATCH 2/3] staging: drm/imx: several bug fixes Lothar Waßmann
2012-12-25 14:58 ` [PATCH 3/3] staging: drm/imx: fix double free bug in error path Lothar Waßmann
2012-12-27 10:06 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121227100651.GT26326@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=LW@KARO-electronics.de \
    --cc=fabio.estevam@freescale.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®