* [PATCH] [media] s5p_cec: Fix memory allocation failure check
@ 2016-08-31 13:45 Christophe JAILLET
0 siblings, 0 replies; only message in thread
From: Christophe JAILLET @ 2016-08-31 13:45 UTC (permalink / raw)
To: mchehab, gregkh
Cc: linux-media, devel, linux-kernel, kernel-janitors, Christophe JAILLET
It is likely that checking the result of the memory allocation just above
is expected here.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/staging/media/s5p-cec/s5p_cec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/s5p-cec/s5p_cec.c b/drivers/staging/media/s5p-cec/s5p_cec.c
index 78333273c4e5..636bac182e8e 100644
--- a/drivers/staging/media/s5p-cec/s5p_cec.c
+++ b/drivers/staging/media/s5p-cec/s5p_cec.c
@@ -173,7 +173,7 @@ static int s5p_cec_probe(struct platform_device *pdev)
int ret;
cec = devm_kzalloc(&pdev->dev, sizeof(*cec), GFP_KERNEL);
- if (!dev)
+ if (!cec)
return -ENOMEM;
cec->dev = dev;
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-31 13:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-31 13:45 [PATCH] [media] s5p_cec: Fix memory allocation failure check Christophe JAILLET
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).