aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core/v4l2-async.c
diff options
context:
space:
mode:
authorSakari Ailus <[email protected]>2024-05-20 07:28:20 +0000
committerHans Verkuil <[email protected]>2024-06-04 06:31:24 +0000
commit7d30b8efae814bc73541720ca188dc205cd7d2b8 (patch)
treeef117a1cb86c7e188bb47080224745c532559932 /drivers/media/v4l2-core/v4l2-async.c
parentmedia: i2c: imx258: Convert to new CCI register access helpers (diff)
downloadkernel-7d30b8efae814bc73541720ca188dc205cd7d2b8.tar.gz
kernel-7d30b8efae814bc73541720ca188dc205cd7d2b8.zip
media: async: Warn on attept to create an ancillary link to a non-subdev
Warn if a lens or a flash async sub-device is bound to a non-sub-device notifier. This isn't meaningful and unlikely to happen in practice but print a warning as we nevertheless won't consider this an error. Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-async.c')
-rw-r--r--drivers/media/v4l2-core/v4l2-async.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
index c477723c07bf..81a9b5473969 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -323,8 +323,12 @@ static int v4l2_async_create_ancillary_links(struct v4l2_async_notifier *n,
sd->entity.function != MEDIA_ENT_F_FLASH)
return 0;
- if (!n->sd)
+ if (!n->sd) {
+ dev_warn(notifier_dev(n),
+ "not a sub-device notifier, not creating an ancillary link for %s!\n",
+ dev_name(sd->dev));
return 0;
+ }
link = media_create_ancillary_link(&n->sd->entity, &sd->entity);