Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Sasha Levin and committed by
Mauro Carvalho Chehab
9a3323ae c84401c2

+1 -3
+1 -3
drivers/media/platform/m2m-deinterlace.c
··· 917 917 ctx->xt = kzalloc(sizeof(struct dma_async_tx_descriptor) + 918 918 sizeof(struct data_chunk), GFP_KERNEL); 919 919 if (!ctx->xt) { 920 - int ret = PTR_ERR(ctx->xt); 921 - 922 920 kfree(ctx); 923 - return ret; 921 + return -ENOMEM; 924 922 } 925 923 926 924 ctx->colorspace = V4L2_COLORSPACE_REC709;