public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Chad Dupuis <chad.dupuis@qlogic.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: QLogic-Storage-Upstream@qlogic.com,
	"James E.J. Bottomley" <JBottomley@parallels.com>,
	linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] bnx2fc: fix an error code in _bnx2fc_create()
Date: Wed, 5 Nov 2014 15:48:09 -0500	[thread overview]
Message-ID: <alpine.OSX.2.00.1411051547550.2442@administrators-macbook-pro.local> (raw)
In-Reply-To: <20141104103759.GB19096@mwanda>

Looks ok.
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>

On Tue, 4 Nov 2014, Dan Carpenter wrote:

> We should be returning an error code here instead of success.  Either
> -ENODEV or -ENOMEM would work.  There is also a failure message in
> printk().
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> index dfed4be..251b114 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> @@ -2195,6 +2195,7 @@ static int _bnx2fc_create(struct net_device *netdev,
> 	interface = bnx2fc_interface_create(hba, netdev, fip_mode);
> 	if (!interface) {
> 		printk(KERN_ERR PFX "bnx2fc_interface_create failed\n");
> +		rc = -ENOMEM;
> 		goto ifput_err;
> 	}
>
>

      reply	other threads:[~2014-11-05 20:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 10:37 [patch 2/2] bnx2fc: fix an error code in _bnx2fc_create() Dan Carpenter
2014-11-05 20:48 ` Chad Dupuis [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=alpine.OSX.2.00.1411051547550.2442@administrators-macbook-pro.local \
    --to=chad.dupuis@qlogic.com \
    --cc=JBottomley@parallels.com \
    --cc=QLogic-Storage-Upstream@qlogic.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-scsi@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