netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Chan <michael.chan@broadcom.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Edwin Peer <edwin.peer@broadcom.com>,
	Zhang Changzhong <zhangchangzhong@huawei.com>,
	"David S . Miller" <davem@davemloft.net>,
	Prashant Sreedharan <prashant@broadcom.com>,
	Jeffrey Huang <huangjw@broadcom.com>,
	Eddie Wai <eddie.wai@broadcom.com>,
	netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] bnxt_en: fix error return code in bnxt_init_board()
Date: Thu, 19 Nov 2020 23:17:01 -0800	[thread overview]
Message-ID: <CACKFLimkjTmZZe4Wpy0YERit=nVa6tPkUQ9L5Pwx4gYg-=Qc7w@mail.gmail.com> (raw)
In-Reply-To: <20201119215309.0f9c4b82@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>

[-- Attachment #1: Type: text/plain, Size: 1067 bytes --]

On Thu, Nov 19, 2020 at 9:53 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Thu, 19 Nov 2020 10:53:23 -0800 Edwin Peer wrote:
> > > Fix to return a negative error code from the error handling
> > > case instead of 0, as done elsewhere in this function.
> > >
> > > Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
> > > Reported-by: Hulk Robot <hulkci@huawei.com>
> > > Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
>
> > >         if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)) != 0 &&
> > >             dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)) != 0) {
> > >                 dev_err(&pdev->dev, "System does not support DMA, aborting\n");
> > > +               rc = -EIO;
> > >                 goto init_err_disable;
>
> Edwin, please double check if this shouldn't jump to
> pci_release_regions() (or maybe it's harmless 'cause
> PCI likes to magically release things on its own).

Good point.  We definitely should call pci_release_regions() for correctness.

I will send out the patch shortly.  Thanks.

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4166 bytes --]

      reply	other threads:[~2020-11-20  7:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 13:30 [PATCH net] bnxt_en: fix error return code in bnxt_init_board() Zhang Changzhong
2020-11-19 18:53 ` Edwin Peer
2020-11-20  5:53   ` Jakub Kicinski
2020-11-20  7:17     ` Michael Chan [this message]

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='CACKFLimkjTmZZe4Wpy0YERit=nVa6tPkUQ9L5Pwx4gYg-=Qc7w@mail.gmail.com' \
    --to=michael.chan@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=eddie.wai@broadcom.com \
    --cc=edwin.peer@broadcom.com \
    --cc=huangjw@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=prashant@broadcom.com \
    --cc=zhangchangzhong@huawei.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;
as well as URLs for NNTP newsgroup(s).