| From | Sasha Levin <> | Subject | [PATCH] m2m-deinterlace: use correct check for kzalloc failure | Date | Thu, 20 Dec 2012 14:11:18 -0500 |
| |
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> --- 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
|