DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ravi Kerur <rkerur@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v1] Return ENOMEM during mpipe_devinit failure
Date: Wed, 19 Aug 2015 13:00:07 -0700	[thread overview]
Message-ID: <1440014407-3233-1-git-send-email-rkerur@gmail.com> (raw)

In function rte_pmd_mpipe_devinit, if rte_eth_dev_allocate
fails return error which is inline with other drivers.

Signed-off-by: Ravi Kerur <rkerur@gmail.com>
---
 drivers/net/mpipe/mpipe_tilegx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mpipe/mpipe_tilegx.c b/drivers/net/mpipe/mpipe_tilegx.c
index 743feef..6e3e304 100644
--- a/drivers/net/mpipe/mpipe_tilegx.c
+++ b/drivers/net/mpipe/mpipe_tilegx.c
@@ -1582,6 +1582,7 @@ rte_pmd_mpipe_devinit(const char *ifname,
 	if (!eth_dev) {
 		RTE_LOG(ERR, PMD, "%s: Failed to allocate device.\n", ifname);
 		rte_free(priv);
+		return -ENOMEM;
 	}
 
 	RTE_LOG(INFO, PMD, "%s: Initialized mpipe device"
-- 
1.9.1

             reply	other threads:[~2015-08-19 20:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19 20:00 Ravi Kerur [this message]
2015-08-20  2:07 ` Tetsuya Mukawa
2015-08-20  2:14 ` Tony Lu
2015-10-24 17:28   ` Thomas Monjalon

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=1440014407-3233-1-git-send-email-rkerur@gmail.com \
    --to=rkerur@gmail.com \
    --cc=dev@dpdk.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).