mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers/media/pci/solo6x10/solo6x10-disp.c: check kzalloc() result
@ 2014-07-25 18:30 Andrey Utkin
  2014-07-25 18:32 ` Andrey Utkin
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Utkin @ 2014-07-25 18:30 UTC (permalink / raw)
  To: m.chehab, hans.verkuil, khalasa, ismael.luceno
  Cc: linux-media, linux-kernel, kernel-janitors, Andrey Utkin

Signed-off-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
---
 drivers/media/pci/solo6x10/solo6x10-disp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/pci/solo6x10/solo6x10-disp.c b/drivers/media/pci/solo6x10/solo6x10-disp.c
index ed88ab4..93cbbb1 100644
--- a/drivers/media/pci/solo6x10/solo6x10-disp.c
+++ b/drivers/media/pci/solo6x10/solo6x10-disp.c
@@ -216,6 +216,8 @@ int solo_set_motion_block(struct solo_dev *solo_dev, u8 ch,
 	int ret = 0;
 
 	buf = kzalloc(size, GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
 	for (y = 0; y < SOLO_MOTION_SZ; y++) {
 		for (x = 0; x < SOLO_MOTION_SZ; x++)
 			buf[x] = cpu_to_le16(thresholds[y * SOLO_MOTION_SZ + x]);
-- 
1.8.5.5


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-26 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-25 18:30 [PATCH] drivers/media/pci/solo6x10/solo6x10-disp.c: check kzalloc() result Andrey Utkin
2014-07-25 18:32 ` Andrey Utkin
2014-07-26  6:13   ` Dan Carpenter
2014-07-26 13:21     ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®