linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: axel.lin@ingics.com (Axel Lin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] soc: ti: knav_qmss_queue: Return proper error if devm_kzalloc fails
Date: Sun, 26 Oct 2014 17:39:26 +0800	[thread overview]
Message-ID: <1414316366.4290.4.camel@phoenix> (raw)
In-Reply-To: <1414316264.4290.2.camel@phoenix>

Return -ENOMEM if devm_kzalloc fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/soc/ti/knav_qmss_queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
index d66aaf2..6f22d56 100644
--- a/drivers/soc/ti/knav_qmss_queue.c
+++ b/drivers/soc/ti/knav_qmss_queue.c
@@ -1640,7 +1640,7 @@ static int knav_queue_init_queues(struct knav_device *kdev)
 	size = (1 << kdev->inst_shift) * kdev->num_queues_in_use;
 	kdev->instances = devm_kzalloc(kdev->dev, size, GFP_KERNEL);
 	if (!kdev->instances)
-		return -1;
+		return -ENOMEM;
 
 	for_each_queue_range(kdev, range) {
 		if (range->ops && range->ops->init_range)
-- 
1.9.1

  parent reply	other threads:[~2014-10-26  9:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-26  9:37 [PATCH 1/3] soc: ti: Use list_first_entry_or_null() at appropriate places Axel Lin
2014-10-26  9:38 ` [PATCH 2/3] soc: ti: knav_qmss_queue: Fix unbalanced locking in knav_pool_create() Axel Lin
2014-10-26  9:39 ` Axel Lin [this message]
2014-10-27 16:34 ` [PATCH 1/3] soc: ti: Use list_first_entry_or_null() at appropriate places Santosh Shilimkar

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=1414316366.4290.4.camel@phoenix \
    --to=axel.lin@ingics.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).