There is no point in PTR_ERR()ing a NULL pointer, use a real error
instead.

Signed-off-by: Sasha Levin <sasha.le...@oracle.com>
---
 drivers/media/platform/m2m-deinterlace.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/platform/m2m-deinterlace.c 
b/drivers/media/platform/m2m-deinterlace.c
index 05c560f..64db74e 100644
--- a/drivers/media/platform/m2m-deinterlace.c
+++ b/drivers/media/platform/m2m-deinterlace.c
@@ -917,10 +917,8 @@ static int deinterlace_open(struct file *file)
        ctx->xt = kzalloc(sizeof(struct dma_async_tx_descriptor) +
                                sizeof(struct data_chunk), GFP_KERNEL);
        if (!ctx->xt) {
-               int ret = PTR_ERR(ctx->xt);
-
                kfree(ctx);
-               return ret;
+               return -ENOMEM;
        }
 
        ctx->colorspace = V4L2_COLORSPACE_REC709;
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to