diff options
author | Sasha Levin <sasha.levin@oracle.com> | 2012-12-20 18:11:18 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-27 21:08:12 (GMT) |
commit | 9a3323aef4e32585a76ace5f53973404e7e5afee (patch) | |
tree | 7aa841aa3ee4db8d5c0e6d9dd5311de4b74c4eae /drivers/media/platform/m2m-deinterlace.c | |
parent | c84401c200423e4855bc990d8460cc0c3a2bb664 (diff) | |
download | linux-fsl-qoriq-9a3323aef4e32585a76ace5f53973404e7e5afee.tar.xz |
[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>
Diffstat (limited to 'drivers/media/platform/m2m-deinterlace.c')
-rw-r--r-- | drivers/media/platform/m2m-deinterlace.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c index ed77a64..6c4db9b 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; |