Skip to content

Commit

Permalink
[media] s5p-mfc: Correct check of vb2_dma_contig_init_ctx return value
Browse files Browse the repository at this point in the history
vb2_dma_contig_init_ctx returns an error if failed, NULL check is not necessary.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Kamil Debski authored and Mauro Carvalho Chehab committed Jan 6, 2013
1 parent 2e731e4 commit ef89fff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/platform/s5p-mfc/s5p_mfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,12 +1135,12 @@ static int s5p_mfc_probe(struct platform_device *pdev)
}

dev->alloc_ctx[0] = vb2_dma_contig_init_ctx(dev->mem_dev_l);
if (IS_ERR_OR_NULL(dev->alloc_ctx[0])) {
if (IS_ERR(dev->alloc_ctx[0])) {
ret = PTR_ERR(dev->alloc_ctx[0]);
goto err_res;
}
dev->alloc_ctx[1] = vb2_dma_contig_init_ctx(dev->mem_dev_r);
if (IS_ERR_OR_NULL(dev->alloc_ctx[1])) {
if (IS_ERR(dev->alloc_ctx[1])) {
ret = PTR_ERR(dev->alloc_ctx[1]);
goto err_mem_init_ctx_1;
}
Expand Down

0 comments on commit ef89fff

Please sign in to comment.