diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-11-24 21:35:48 -0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-03-06 03:22:35 +0000 |
commit | 754aed1b98d1c1ed2a8eaae2fc933bc9c6a87629 (patch) | |
tree | 2195326e379050dde1537e55f823d86ee1577255 /fs/efs | |
parent | 4e392406854be9807fbd51e626ec74530655e8a4 (diff) |
v4l: Reset subdev v4l2_dev field to NULL if registration fails
commit 317efce991620adc589b3005b9baed433dcb2a56 upstream.
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[bwh: Backported to 3.2: adjust context, filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs/efs')
0 files changed, 0 insertions, 0 deletions