mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
To: m.chehab@samsung.com, hans.verkuil@cisco.com, khalasa@piap.pl,
	ismael.luceno@corp.bluecherry.net
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org,
	Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Subject: [PATCH] drivers/media/pci/solo6x10/solo6x10-disp.c: check kzalloc() result
Date: Fri, 25 Jul 2014 21:30:49 +0300	[thread overview]
Message-ID: <1406313049-9604-1-git-send-email-andrey.utkin@corp.bluecherry.net> (raw)

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


             reply	other threads:[~2014-07-25 18:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25 18:30 Andrey Utkin [this message]
2014-07-25 18:32 ` Andrey Utkin
2014-07-26  6:13   ` Dan Carpenter
2014-07-26 13:21     ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406313049-9604-1-git-send-email-andrey.utkin@corp.bluecherry.net \
    --to=andrey.utkin@corp.bluecherry.net \
    --cc=hans.verkuil@cisco.com \
    --cc=ismael.luceno@corp.bluecherry.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=khalasa@piap.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®