]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[media] s5p-tv: fix error return code in mxr_acquire_video()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 13 May 2013 04:49:13 +0000 (01:49 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 13 Jun 2013 00:42:04 +0000 (21:42 -0300)
Fix to return a negative error code in the vb2_dma_contig_init_ctx()
error handling case instead of 0, as done elsewhere in this function.
Also vb2_dma_contig_init_ctx() return ERR_PTR() in case of error and
never return NULL, so use IS_ERR() replace IS_ERR_OR_NULL().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/s5p-tv/mixer_video.c

index ef0efdf422fec8b9e1d447e853cfd04d5e590f8c..641b1f071e06a2b74796f030ddfdcdc80644179b 100644 (file)
@@ -81,8 +81,9 @@ int mxr_acquire_video(struct mxr_device *mdev,
        }
 
        mdev->alloc_ctx = vb2_dma_contig_init_ctx(mdev->dev);
-       if (IS_ERR_OR_NULL(mdev->alloc_ctx)) {
+       if (IS_ERR(mdev->alloc_ctx)) {
                mxr_err(mdev, "could not acquire vb2 allocator\n");
+               ret = PTR_ERR(mdev->alloc_ctx);
                goto fail_v4l2_dev;
        }