public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Flavio Ceolin <flavio.ceolin@intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-kernel@vger.kernel.org,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Hans Verkuil" <hans.verkuil@cisco.com>,
	"Petr Cvek" <petr.cvek@tul.cz>,
	"Sakari Ailus" <sakari.ailus@iki.fi>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Julia Lawall" <Julia.Lawall@lip6.fr>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)"
	<linux-media@vger.kernel.org>
Subject: Re: [PATCH] media: pxa_camera: disable and unprepare the clock source on error
Date: Mon, 11 Dec 2017 13:05:46 -0800	[thread overview]
Message-ID: <878te9561h.fsf@faceolin-mobl2.amr.corp.intel.com> (raw)
In-Reply-To: <1880720.cnKARQTyeT@avalon>

Hi Laurent,

> Hi Flavio,
>
> Thank you for the patch.
>
> On Wednesday, 6 December 2017 18:38:50 EET Flavio Ceolin wrote:
>> pxa_camera_probe() was not calling pxa_camera_deactivate(),
>> responsible to call clk_disable_unprepare(), on the failure path. This
>> was leading to unbalancing source clock.
>> 
>> Found by Linux Driver Verification project (linuxtesting.org).
>
> Any chance I could sign you up for more work on this driver ? :-)

Definetely, this would be great :)

>
>> Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> I expect Hans Verkuil to pick up the patch.
>
>> ---
>>  drivers/media/platform/pxa_camera.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/media/platform/pxa_camera.c
>> b/drivers/media/platform/pxa_camera.c index 9d3f0cb..7877037 100644
>> --- a/drivers/media/platform/pxa_camera.c
>> +++ b/drivers/media/platform/pxa_camera.c
>> @@ -2489,7 +2489,7 @@ static int pxa_camera_probe(struct platform_device
>> *pdev) dev_set_drvdata(&pdev->dev, pcdev);
>>  	err = v4l2_device_register(&pdev->dev, &pcdev->v4l2_dev);
>>  	if (err)
>> -		goto exit_free_dma;
>> +		goto exit_deactivate;
>> 
>>  	pcdev->asds[0] = &pcdev->asd;
>>  	pcdev->notifier.subdevs = pcdev->asds;
>> @@ -2525,6 +2525,8 @@ static int pxa_camera_probe(struct platform_device
>> *pdev) v4l2_clk_unregister(pcdev->mclk_clk);
>>  exit_free_v4l2dev:
>>  	v4l2_device_unregister(&pcdev->v4l2_dev);
>> +exit_deactivate:
>> +	pxa_camera_deactivate(pcdev);
>>  exit_free_dma:
>>  	dma_release_channel(pcdev->dma_chans[2]);
>>  exit_free_dma_u:
>
> -- 
> Regards,
>
> Laurent Pinchart

Regards,
Flavio Ceolin

  reply	other threads:[~2017-12-11 21:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 16:38 [PATCH] media: pxa_camera: disable and unprepare the clock source on error Flavio Ceolin
2017-12-11 16:51 ` Laurent Pinchart
2017-12-11 21:05   ` Flavio Ceolin [this message]
2017-12-11 21:43     ` Laurent Pinchart
2017-12-11 23:36       ` Flavio Ceolin

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=878te9561h.fsf@faceolin-mobl2.amr.corp.intel.com \
    --to=flavio.ceolin@intel.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=arnd@arndb.de \
    --cc=hans.verkuil@cisco.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=petr.cvek@tul.cz \
    --cc=sakari.ailus@iki.fi \
    /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