All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
To: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
	hverkuil@xs4all.nl, ribalda@chromium.org, tfiga@chromium.org,
	senozhatsky@google.com, hch@lst.de, kernel@collabora.com
Subject: Re: [PATCH 1/3] media: stk1160: fix number of buffers in case not all buffers are created
Date: Tue, 11 Jan 2022 09:21:53 -0300	[thread overview]
Message-ID: <Yd12Ydvs67FCEnSi@eze-laptop> (raw)
In-Reply-To: <20220111065505.6323-2-dafna.hirschfeld@collabora.com>

On Tue, Jan 11, 2022 at 08:55:03AM +0200, Dafna Hirschfeld wrote:
> In case we fail to allocate a transfer_buffer then we
> break the buffers creation loop and update the number of
> buffers to the number of successfully allocated which should
> be 'i' and not 'i - 1'
> 
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>

Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>

> ---
>  drivers/media/usb/stk1160/stk1160-video.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/usb/stk1160/stk1160-video.c b/drivers/media/usb/stk1160/stk1160-video.c
> index 202b084f65a2..91bd6adccdd1 100644
> --- a/drivers/media/usb/stk1160/stk1160-video.c
> +++ b/drivers/media/usb/stk1160/stk1160-video.c
> @@ -511,9 +511,9 @@ int stk1160_alloc_isoc(struct stk1160 *dev)
>  	usb_free_urb(dev->isoc_ctl.urb[i]);
>  	dev->isoc_ctl.urb[i] = NULL;
>  
> -	stk1160_warn("%d urbs allocated. Trying to continue...\n", i - 1);
> +	stk1160_warn("%d urbs allocated. Trying to continue...\n", i);
>  
> -	dev->isoc_ctl.num_bufs = i - 1;
> +	dev->isoc_ctl.num_bufs = i;
>  
>  	return 0;
>  
> -- 
> 2.17.1
> 

  reply	other threads:[~2022-01-11 12:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11  6:55 [PATCH 0/3] media: stk1160: allocate urb buffs with the DMA noncontiguous API Dafna Hirschfeld
2022-01-11  6:55 ` [PATCH 1/3] media: stk1160: fix number of buffers in case not all buffers are created Dafna Hirschfeld
2022-01-11 12:21   ` Ezequiel Garcia [this message]
2022-01-11  6:55 ` [PATCH 2/3] media: stk1160: move transfer_buffer and urb to same struct 'stk1160_urb' Dafna Hirschfeld
2022-01-11  8:10   ` Christoph Hellwig
2022-01-11 12:29   ` Ezequiel Garcia
2022-01-11  6:55 ` [PATCH 3/3] media: stk1160: use dma_alloc_noncontiguous API Dafna Hirschfeld
2022-01-11  8:13   ` Christoph Hellwig
2022-01-11  8:50     ` Dafna Hirschfeld
2022-01-11  8:52       ` Christoph Hellwig
2022-01-11  8:55         ` Dafna Hirschfeld
2022-01-11  8:59           ` Christoph Hellwig
2022-01-12  9:25             ` Sergey Senozhatsky
2022-01-11 12:38   ` Ezequiel Garcia
2022-01-24 14:43     ` Dafna Hirschfeld
2022-01-24 16:02       ` Dafna Hirschfeld

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=Yd12Ydvs67FCEnSi@eze-laptop \
    --to=ezequiel@vanguardiasur.com.ar \
    --cc=dafna.hirschfeld@collabora.com \
    --cc=hch@lst.de \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=ribalda@chromium.org \
    --cc=senozhatsky@google.com \
    --cc=tfiga@chromium.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.