From: Kamil Debski Date: Thu, 3 Jan 2013 10:06:03 +0000 (-0300) Subject: [media] s5p-mfc: Correct check of vb2_dma_contig_init_ctx return value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ef89fff874758c0f08501bdc2932b7e77421cfc6;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [media] s5p-mfc: Correct check of vb2_dma_contig_init_ctx return value vb2_dma_contig_init_ctx returns an error if failed, NULL check is not necessary. Signed-off-by: Kamil Debski Signed-off-by: Kyungmin Park Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 9a679fab73e2..4fcd075e8699 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -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; }