[media] m5mols: Fix typo in get_fmt callback
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Wed, 5 Dec 2012 15:49:12 +0000 (12:49 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 6 Jan 2013 11:20:13 +0000 (09:20 -0200)
The check of return value from __find_format() was inverted
by mistake. This patch fixes regression introduced in commit
5565a2ad47 [media] m5mols: Protect driver data with a mutex

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/i2c/m5mols/m5mols_core.c

index 8131d651de9ef11ea5c10d8e4111e9c8e4468896..b9b44855940932a9fd2ca9d50c4bef09c1e14fd1 100644 (file)
@@ -556,7 +556,7 @@ static int m5mols_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
        mutex_lock(&info->lock);
 
        format = __find_format(info, fh, fmt->which, info->res_type);
-       if (!format)
+       if (format)
                fmt->format = *format;
        else
                ret = -EINVAL;