linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakob Normark <jakobnormark@gmail.com>
To: Anil Gurumurthy <agurumur@brocade.com>,
	Vijaya Mohan Guvva <vmohan@brocade.com>,
	"James E.J. Bottomley" <JBottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jakob Normark <jakobnormark@gmail.com>
Subject: [PATCH 1/1] bfa: Fix for possible null pointer dereference
Date: Sun, 26 May 2013 21:51:17 +0200	[thread overview]
Message-ID: <1369597877-3160-1-git-send-email-jakobnormark@gmail.com> (raw)

Fix for cppcheck error in bfa_fcs_lport.c

Kernel version: v3.10-rc2

Signed-off-by: Jakob Normark <jakobnormark@gmail.com>
---
 drivers/scsi/bfa/bfa_fcs_lport.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
index 1224d04..a37c45a 100644
--- a/drivers/scsi/bfa/bfa_fcs_lport.c
+++ b/drivers/scsi/bfa/bfa_fcs_lport.c
@@ -5615,13 +5615,14 @@ bfa_fcs_lport_get_rport_max_speed(bfa_fcs_lport_t *port)
 	bfa_port_speed_t max_speed = 0;
 	struct bfa_port_attr_s port_attr;
 	bfa_port_speed_t port_speed, rport_speed;
-	bfa_boolean_t trl_enabled = bfa_fcport_is_ratelim(port->fcs->bfa);
+	bfa_boolean_t trl_enabled;
 
 
 	if (port == NULL)
 		return 0;
 
 	fcs = port->fcs;
+	trl_enabled = bfa_fcport_is_ratelim(port->fcs->bfa);
 
 	/* Get Physical port's current speed */
 	bfa_fcport_get_attr(port->fcs->bfa, &port_attr);
-- 
1.7.9.5


             reply	other threads:[~2013-05-26 19:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-26 19:51 Jakob Normark [this message]
2013-05-28  9:29 ` [PATCH 1/1] bfa: Fix for possible null pointer dereference Vijaya Mohan Guvva Guvva

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=1369597877-3160-1-git-send-email-jakobnormark@gmail.com \
    --to=jakobnormark@gmail.com \
    --cc=JBottomley@parallels.com \
    --cc=agurumur@brocade.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=vmohan@brocade.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).