When we add fwnodes to V4L2 notifiers through v4l2_async_notifier_add_subdev they are stored internally in V4L2 core, and have a reference count released upon any call to v4l2_async_notifier_cleanup(). Ensure that any source successfully added to a notifier gets its fwnode reference count increased accordingly. Signed-off-by: Kieran Bingham <kieran.bingham+renesas@xxxxxxxxxxxxxxxx> --- drivers/media/i2c/max9286.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c index f3311210a666..62615e6ab710 100644 --- a/drivers/media/i2c/max9286.c +++ b/drivers/media/i2c/max9286.c @@ -665,6 +665,11 @@ static int max9286_v4l2_async_register(struct max9286_priv *priv) v4l2_async_notifier_cleanup(&priv->notifier); return ret; } + + /* Balance the refernce counting handled through + * v4l2_async_notifier_cleanup() + */ + fwnode_handle_get(source->fwnode); } priv->notifier.ops = &max9286_notify_ops; -- 2.20.1