Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a3323ae authored by Sasha Levin's avatar Sasha Levin Committed by Mauro Carvalho Chehab
Browse files

[media] m2m-deinterlace: use correct check for kzalloc failure



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

Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c84401c2
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;