All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] [media]: mx2_camera: Fix regression caused by clock conversion
Date: Tue, 9 Oct 2012 14:34:46 +0100	[thread overview]
Message-ID: <20121009133446.GE4625@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1349735823-30315-1-git-send-email-festevam@gmail.com>

On Mon, Oct 08, 2012 at 07:37:03PM -0300, Fabio Estevam wrote:
> @@ -460,7 +462,11 @@ static int mx2_camera_add_device(struct soc_camera_device *icd)
>  	if (pcdev->icd)
>  		return -EBUSY;
>  
> -	ret = clk_prepare_enable(pcdev->clk_csi);
> +	ret = clk_prepare_enable(pcdev->clk_csi_ahb);
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = clk_prepare_enable(pcdev->clk_csi_per);
>  	if (ret < 0)
>  		return ret;

>From the point of view of error cleanup, this looks buggy to me.  If
the prepare_enable for the per clock fails, what cleans up the ahb clock?

WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Fabio Estevam <festevam@gmail.com>
Cc: g.liakhovetski@gmx.de,
	Fabio Estevam <fabio.estevam@freescale.com>,
	mchehab@infradead.org, javier.martin@vista-silicon.com,
	kernel@pengutronix.de, linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, gcembed@gmail.com
Subject: Re: [PATCH v2 2/2] [media]: mx2_camera: Fix regression caused by clock conversion
Date: Tue, 9 Oct 2012 14:34:46 +0100	[thread overview]
Message-ID: <20121009133446.GE4625@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1349735823-30315-1-git-send-email-festevam@gmail.com>

On Mon, Oct 08, 2012 at 07:37:03PM -0300, Fabio Estevam wrote:
> @@ -460,7 +462,11 @@ static int mx2_camera_add_device(struct soc_camera_device *icd)
>  	if (pcdev->icd)
>  		return -EBUSY;
>  
> -	ret = clk_prepare_enable(pcdev->clk_csi);
> +	ret = clk_prepare_enable(pcdev->clk_csi_ahb);
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = clk_prepare_enable(pcdev->clk_csi_per);
>  	if (ret < 0)
>  		return ret;

>From the point of view of error cleanup, this looks buggy to me.  If
the prepare_enable for the per clock fails, what cleans up the ahb clock?

  parent reply	other threads:[~2012-10-09 13:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08 22:37 [PATCH v2 2/2] [media]: mx2_camera: Fix regression caused by clock conversion Fabio Estevam
2012-10-08 22:37 ` Fabio Estevam
2012-10-09 11:16 ` javier Martin
2012-10-09 11:16   ` javier Martin
2012-10-09 12:12   ` Fabio Estevam
2012-10-09 12:12     ` Fabio Estevam
2012-10-09 12:48 ` Gaëtan Carlier
2012-10-09 12:48   ` Gaëtan Carlier
2012-10-09 12:52   ` javier Martin
2012-10-09 12:52     ` javier Martin
2012-10-09 13:34 ` Russell King - ARM Linux [this message]
2012-10-09 13:34   ` Russell King - ARM Linux

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=20121009133446.GE4625@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.