From: Stephen Hemminger <stephen@networkplumber.org>
To: <Bryan.Whitehead@microchip.com>
Cc: <netdev@vger.kernel.org>, <davem@davemloft.net>,
<UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH net-next 1/3] Add LAN743X driver
Date: Fri, 11 Aug 2017 15:50:57 -0700 [thread overview]
Message-ID: <20170811155057.30cb4966@xeon-e3> (raw)
In-Reply-To: <90A7E81AE28BAE4CBDDB3B35F187D264406F603F@CHN-SV-EXMX02.mchp-main.com>
On Fri, 11 Aug 2017 19:47:57 +0000
<Bryan.Whitehead@microchip.com> wrote:
> +
> + netdev = alloc_etherdev(sizeof(struct lan743x_adapter));
> + if (!netdev) {
> + NETIF_ERROR(adapter, probe, adapter->netdev,
> + "alloc_etherdev returned NULL");
> + ret = -ENOMEM;
> + goto clean_up;
> + }
> +
> + strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
> + SET_NETDEV_DEV(netdev, &pdev->dev);
> + pci_set_drvdata(pdev, netdev);
> + adapter = netdev_priv(netdev);
> + if (!adapter) {
> + NETIF_ERROR(adapter, probe, adapter->netdev,
> + "netdev_priv returned NULL");
> + ret = -ENOMEM;
> + goto clean_up;
> + }
> + memset(adapter, 0, sizeof(struct lan743x_adapter));
netdev_priv area is already zerod
next prev parent reply other threads:[~2017-08-11 22:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-11 19:47 [PATCH net-next 1/3] Add LAN743X driver Bryan.Whitehead
2017-08-11 22:12 ` David Miller
2017-08-11 22:34 ` Andrew Lunn
2017-08-14 16:13 ` Bryan.Whitehead
2017-08-14 16:12 ` Bryan.Whitehead
2017-08-11 22:31 ` Andrew Lunn
2017-08-11 22:49 ` Stephen Hemminger
2017-08-11 22:50 ` Stephen Hemminger [this message]
2017-08-11 22:52 ` Stephen Hemminger
2017-08-11 22:57 ` Stephen Hemminger
2017-08-11 22:59 ` Stephen Hemminger
2017-08-11 23:05 ` Stephen Hemminger
2017-08-14 16:15 ` Bryan.Whitehead
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=20170811155057.30cb4966@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=Bryan.Whitehead@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--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