]> git.baikalelectronics.ru Git - kernel.git/commit
media: software_node: Fix refcounts in software_node_get_next_child()
authorDaniel Scally <djrscally@gmail.com>
Thu, 7 Jan 2021 13:28:24 +0000 (14:28 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 26 Jan 2021 18:19:56 +0000 (19:19 +0100)
commit5c1cb80f8e4ebce4af110a014eaed158a386255a
tree474bd1ba108a4374d9b08e5daf1b9b5cfe8bea0b
parent7e0239c0999806b5f0c533f0e00dd7c485640fd3
media: software_node: Fix refcounts in software_node_get_next_child()

The software_node_get_next_child() function currently does not hold
references to the child software_node that it finds or put the ref that
is held against the old child - fix that.

Fixes: 1a64d8f3df4e ("drivers: base: Introducing software nodes to the firmware node framework")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/base/swnode.c