From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] v4l: Reset subdev v4l2_dev field to NULL if registration fails
Date: Wed, 28 Nov 2012 14:36:02 +0100 [thread overview]
Message-ID: <6841513.2rQ6d3CPlS@avalon> (raw)
In-Reply-To: <50B544B0.9000207@gmail.com>
Hi Sylwester,
On Tuesday 27 November 2012 23:54:40 Sylwester Nawrocki wrote:
> On 11/25/2012 01:41 AM, Laurent Pinchart wrote:
> > When subdev registration fails the subdev v4l2_dev field is left to a
> > non-NULL value. Later calls to v4l2_device_unregister_subdev() will
> > consider the subdev as registered and will module_put() the subdev
> > module without any matching module_get().
> >
> > Fix this by setting the subdev v4l2_dev field to NULL in
> > v4l2_device_register_subdev() when the function fails.
> >
> > Signed-off-by: Laurent Pinchart<laurent.pinchart@ideasonboard.com>
>
> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Thank you.
> I'm just wondering whether including this patch in stable kernel releases
> could potentially break anything.
I don't think it would, the patch only touches error paths, and clearly fixes
a bug. So
Cc: stable@vger.kernel.org
looks like a good idea.
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2012-11-28 13:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-25 0:41 [PATCH] v4l: Reset subdev v4l2_dev field to NULL if registration fails Laurent Pinchart
2012-11-27 22:54 ` Sylwester Nawrocki
2012-11-28 13:36 ` Laurent Pinchart [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=6841513.2rQ6d3CPlS@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sylvester.nawrocki@gmail.com \
/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.