Re: [PATCH] v4l: Reset subdev v4l2_dev field to NULL if registration fails

2012-11-28 Thread Laurent Pinchart
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

Re: [PATCH] v4l: Reset subdev v4l2_dev field to NULL if registration fails

2012-11-27 Thread Sylwester Nawrocki
Hi Laurent, 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

[PATCH] v4l: Reset subdev v4l2_dev field to NULL if registration fails

2012-11-24 Thread Laurent Pinchart
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