From c574b759138474d2fbe7e437c529010b7f4db2f1 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Tue, 16 Feb 2016 18:03:21 -0200 Subject: [PATCH] [media] v4l2-async: Don't fail if registered_async isn't implemented After sub-dev registration in v4l2_async_test_notify(), the v4l2-async core calls the registered_async callback but if a sub-dev driver does not implement it, v4l2_subdev_call() will return a -ENOIOCTLCMD which should not be considered an error. Reported-by: Benoit Parrot Signed-off-by: Javier Martinez Canillas Tested-by: Benoit Parrot Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index 716bfd47daab..a4b224d92572 100644 --- a/drivers/media/v4l2-core/v4l2-async.c +++ b/drivers/media/v4l2-core/v4l2-async.c @@ -120,7 +120,7 @@ static int v4l2_async_test_notify(struct v4l2_async_notifier *notifier, } ret = v4l2_subdev_call(sd, core, registered_async); - if (ret < 0) { + if (ret < 0 && ret != -ENOIOCTLCMD) { if (notifier->unbind) notifier->unbind(notifier, sd, asd); return ret; -- 2.20.1