From: Madalin Bucur <madalin.bucur@nxp.com>
To: <netdev@vger.kernel.org>, <davem@davemloft.net>
Cc: <linuxppc-dev@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v3 7/7] dpaa_eth: check allocation result
Date: Thu, 24 Aug 2017 10:28:28 +0300 [thread overview]
Message-ID: <1503559708-13405-8-git-send-email-madalin.bucur@nxp.com> (raw)
In-Reply-To: <1503559708-13405-1-git-send-email-madalin.bucur@nxp.com>
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 73ca8d7..4225806 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2561,6 +2561,9 @@ static struct dpaa_bp *dpaa_bp_alloc(struct device *dev)
dpaa_bp->bpid = FSL_DPAA_BPID_INV;
dpaa_bp->percpu_count = devm_alloc_percpu(dev, *dpaa_bp->percpu_count);
+ if (!dpaa_bp->percpu_count)
+ return ERR_PTR(-ENOMEM);
+
dpaa_bp->config_count = FSL_DPAA_ETH_MAX_BUF_COUNT;
dpaa_bp->seed_cb = dpaa_bp_seed;
--
2.1.0
next prev parent reply other threads:[~2017-08-24 7:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-24 7:28 [PATCH v3 0/7] Add RSS to DPAA 1.x Ethernet driver Madalin Bucur
2017-08-24 7:28 ` [PATCH v3 1/7] fsl/fman: move struct fman to header file Madalin Bucur
2017-08-24 7:28 ` [PATCH v3 2/7] fsl/fman: enable FMan Keygen Madalin Bucur
2017-08-24 7:28 ` [PATCH v3 3/7] dpaa_eth: use multiple Rx frame queues Madalin Bucur
2017-08-24 7:28 ` [PATCH v3 4/7] dpaa_eth: enable Rx hashing control Madalin Bucur
2017-08-24 7:28 ` [PATCH v3 5/7] dpaa_eth: add NETIF_F_RXHASH Madalin Bucur
2017-08-24 7:28 ` [PATCH v3 6/7] Documentation: networking: add RSS information Madalin Bucur
2017-08-24 7:28 ` Madalin Bucur [this message]
2017-08-24 16:42 ` [PATCH v3 0/7] Add RSS to DPAA 1.x Ethernet driver David Miller
2017-08-24 18:47 ` David Miller
2017-08-25 5:50 ` Madalin-cristian Bucur
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=1503559708-13405-8-git-send-email-madalin.bucur@nxp.com \
--to=madalin.bucur@nxp.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.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