diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-05-13 00:49:13 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-12 20:42:04 -0400 |
commit | 6a2f18cf58a59ba7de2a5f912b12d9732702969c (patch) | |
tree | 96a940843ebc499af8e472fb886ca2a5db667592 /drivers/media/platform/s5p-tv | |
parent | d46a5a68b1690fc9f47d6b3e13ccef4e79a87e84 (diff) |
[media] s5p-tv: fix error return code in mxr_acquire_video()
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>
Diffstat (limited to 'drivers/media/platform/s5p-tv')
-rw-r--r-- | drivers/media/platform/s5p-tv/mixer_video.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c index ef0efdf422fe..641b1f071e06 100644 --- a/drivers/media/platform/s5p-tv/mixer_video.c +++ b/drivers/media/platform/s5p-tv/mixer_video.c | |||
@@ -81,8 +81,9 @@ int mxr_acquire_video(struct mxr_device *mdev, | |||
81 | } | 81 | } |
82 | 82 | ||
83 | mdev->alloc_ctx = vb2_dma_contig_init_ctx(mdev->dev); | 83 | mdev->alloc_ctx = vb2_dma_contig_init_ctx(mdev->dev); |
84 | if (IS_ERR_OR_NULL(mdev->alloc_ctx)) { | 84 | if (IS_ERR(mdev->alloc_ctx)) { |
85 | mxr_err(mdev, "could not acquire vb2 allocator\n"); | 85 | mxr_err(mdev, "could not acquire vb2 allocator\n"); |
86 | ret = PTR_ERR(mdev->alloc_ctx); | ||
86 | goto fail_v4l2_dev; | 87 | goto fail_v4l2_dev; |
87 | } | 88 | } |
88 | 89 | ||