All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
To: "Krzysztof Hałasa" <khalasa@piap.pl>
Cc: linux-media <linux-media@vger.kernel.org>,
	zhaoxuegang <zhaoxuegang@suntec.net>
Subject: Re: [PATCH] TW686x: Fix OOPS on buffer alloc failure
Date: Wed, 10 May 2017 13:18:00 -0300	[thread overview]
Message-ID: <CAAEAJfBVOKBcZBg91EKHBXKMOkM6eRafe8=XnW8E=6vtn2dBmQ@mail.gmail.com> (raw)
In-Reply-To: <m3d1bhhwf3.fsf_-_@t19.piap.pl>

Hi Krzysztof,

On 10 May 2017 at 06:51, Krzysztof Hałasa <khalasa@piap.pl> wrote:
> Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
>
> diff --git a/drivers/media/pci/tw686x/tw686x-video.c b/drivers/media/pci/tw686x/tw686x-video.c
> index c3fafa9..d637f47 100644
> --- a/drivers/media/pci/tw686x/tw686x-video.c
> +++ b/drivers/media/pci/tw686x/tw686x-video.c
> @@ -1190,6 +1190,13 @@ int tw686x_video_init(struct tw686x_dev *dev)
>                         return err;
>         }
>
> +       /* Initialize vc->dev and vc->ch for the error path first */
> +       for (ch = 0; ch < max_channels(dev); ch++) {
> +               struct tw686x_video_channel *vc = &dev->video_channels[ch];
> +               vc->dev = dev;
> +               vc->ch = ch;
> +       }
> +

I'm not sure where is the oops this commit fixes, care to explain it to me?

>         for (ch = 0; ch < max_channels(dev); ch++) {
>                 struct tw686x_video_channel *vc = &dev->video_channels[ch];
>                 struct video_device *vdev;
> @@ -1198,9 +1205,6 @@ int tw686x_video_init(struct tw686x_dev *dev)
>                 spin_lock_init(&vc->qlock);
>                 INIT_LIST_HEAD(&vc->vidq_queued);
>
> -               vc->dev = dev;
> -               vc->ch = ch;
> -
>                 /* default settings */
>                 err = tw686x_set_standard(vc, V4L2_STD_NTSC);
>                 if (err)

Thanks,
-- 
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar

  reply	other threads:[~2017-05-10 16:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <590ADAB1.1040501@suntec.net>
2017-05-10  9:48 ` [PCIE device driver: tw686x] I have some problems with tw686x and I need help Krzysztof Hałasa
2017-05-10  9:51   ` [PATCH] TW686x: Fix OOPS on buffer alloc failure Krzysztof Hałasa
2017-05-10 16:18     ` Ezequiel Garcia [this message]
2017-05-11  7:41       ` Krzysztof Hałasa
2017-05-11 16:04         ` Ezequiel Garcia
2017-05-12  4:39           ` Krzysztof Hałasa
     [not found]             ` <b088a7cd-7585-5235-224d-a90ea9042c24@xs4all.nl>
2017-06-23  8:18               ` Krzysztof Hałasa
2017-06-23 14:52                 ` Ezequiel Garcia
     [not found]       ` <5913C1BB.8000103@suntec.net>
2017-05-11  8:02         ` Krzysztof Hałasa
2018-06-28 21:45 [PATCH] tw686x: Fix oops " Ezequiel Garcia

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='CAAEAJfBVOKBcZBg91EKHBXKMOkM6eRafe8=XnW8E=6vtn2dBmQ@mail.gmail.com' \
    --to=ezequiel@vanguardiasur.com.ar \
    --cc=khalasa@piap.pl \
    --cc=linux-media@vger.kernel.org \
    --cc=zhaoxuegang@suntec.net \
    /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.