]> git.baikalelectronics.ru Git - kernel.git/commit
media: ipu3-cio2: Fix reference counting when looping over ACPI devices
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Sun, 4 Apr 2021 18:14:09 +0000 (20:14 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 2 Jun 2021 09:52:00 +0000 (11:52 +0200)
commit0ef5075caad19847ff8bffc6813aba63222ebc44
treee9852d28e4a575769a78ea34a0cb391d733a449f
parent69b3065ec3db2dc93424475c1d1d84f414eac57d
media: ipu3-cio2: Fix reference counting when looping over ACPI devices

When we continue, due to device is disabled, loop we have to drop
reference count. When we have an array full of devices we have to also
drop the reference count. Note, in this case the
cio2_bridge_unregister_sensors() is called by the caller.

Fixes: f8edd7e4b3a3 ("media: ipu3-cio2: Add cio2-bridge to ipu3-cio2 driver")
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Daniel Scally <djrscally@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/pci/intel/ipu3/cio2-bridge.c