[media] v4l2-async: Don't fail if registered_async isn't implemented
authorJavier Martinez Canillas <[email protected]>
Tue, 16 Feb 2016 20:03:21 +0000 (18:03 -0200)
committerMauro Carvalho Chehab <[email protected]>
Fri, 19 Feb 2016 10:10:31 +0000 (08:10 -0200)
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 <[email protected]>
Signed-off-by: Javier Martinez Canillas <[email protected]>
Tested-by: Benoit Parrot <[email protected]>
Acked-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
drivers/media/v4l2-core/v4l2-async.c

index 716bfd47daabd79827511969aa5da64bb9b290c1..a4b224d92572eb65bae882b3502af05d92331682 100644 (file)
@@ -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;