media: bcm2835-unicam: Fix reference counting in unicam_open
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Thu, 30 Apr 2020 08:52:50 +0000 (09:52 +0100)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:33:54 +0000 (16:33 +0100)
commit873145f0a943736c77a9c20f195e07a939b2ecfd
tree5d91d864e1aebb1ed538c1a27e1bdba5e2ddd9f2
parent6212ceba86a78d1aa54e98c6478927a7fd06212d
media: bcm2835-unicam: Fix reference counting in unicam_open

The reference counting of node->open was only incremented after
a check that the node was v4l2_fh_is_singular_file, which resulted
in the counting going wrong and s_power not being called at an
appropriate time.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/media/platform/bcm2835/bcm2835-unicam.c