* [PATCH] m2m-deinterlace: use correct check for kzalloc failure
[not found] <1356030701-16284-1-git-send-email-sasha.levin@oracle.com>
@ 2012-12-20 19:11 ` Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2012-12-20 19:11 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Sylwester Nawrocki, Javier Martin,
Sasha Levin, Sakari Ailus, linux-media, linux-kernel
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-12-20 19:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1356030701-16284-1-git-send-email-sasha.levin@oracle.com>
2012-12-20 19:11 ` [PATCH] m2m-deinterlace: use correct check for kzalloc failure Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).