mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 01:49:36 +00:00
[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>
This commit is contained in:
parent
c84401c200
commit
9a3323aef4
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue