aboutsummaryrefslogtreecommitdiff
path: root/scripts/docproc.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-11-24 21:35:48 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-14 06:44:33 -0700
commitac871a8a93556bb96e6d11931c4568f60546c50f (patch)
tree4c8d912bf7a2160be692577f749d20a7b4fdb9ad /scripts/docproc.c
parent1b8904da5aa472afbc86ba1a1c297c9bad21eb47 (diff)
media: 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> Cc: Jianguo Wu <wujianguo@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/docproc.c')
0 files changed, 0 insertions, 0 deletions