mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
To: Flavio Ceolin <flavio.ceolin@intel.com>, linux-kernel@vger.kernel.org
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	"open list:ARM/SAMSUNG S5P SERIES JPEG CODEC SUPPORT" 
	<linux-arm-kernel@lists.infradead.org>,
	"open list:ARM/SAMSUNG S5P SERIES JPEG CODEC SUPPORT" 
	<linux-media@vger.kernel.org>
Subject: Re: [PATCH] media: s5p-jpeg: Fix off-by-one problem
Date: Thu, 07 Dec 2017 15:53:23 +0100	[thread overview]
Message-ID: <67ddf04e-2f0f-c14b-90ce-0f29a3647e16@samsung.com> (raw)
In-Reply-To: <20171206163746.8456-1-flavio.ceolin@intel.com>

W dniu 06.12.2017 o 17:37, Flavio Ceolin pisze:
> s5p_jpeg_runtime_resume() does not call clk_disable_unprepare() for
> jpeg->clocks[0] when one of the clk_prepare_enable() fails.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>

Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>


> ---
>   drivers/media/platform/s5p-jpeg/jpeg-core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
> index faac816..79b63da 100644
> --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
> +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
> @@ -3086,7 +3086,7 @@ static int s5p_jpeg_runtime_resume(struct device *dev)
>   	for (i = 0; i < jpeg->variant->num_clocks; i++) {
>   		ret = clk_prepare_enable(jpeg->clocks[i]);
>   		if (ret) {
> -			while (--i > 0)
> +			while (--i >= 0)
>   				clk_disable_unprepare(jpeg->clocks[i]);
>   			return ret;
>   		}
> 

      reply	other threads:[~2017-12-07 14:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171206163802epcas1p3527bd6a922fd31aa80cf349a510a71eb@epcas1p3.samsung.com>
2017-12-06 16:37 ` Flavio Ceolin
2017-12-07 14:53   ` Andrzej Pietrasiewicz [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=67ddf04e-2f0f-c14b-90ce-0f29a3647e16@samsung.com \
    --to=andrzej.p@samsung.com \
    --cc=flavio.ceolin@intel.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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®