public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Eric.Moore@lsi.com
Cc: mpt_linux_developer@lsi.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: drivers/message/fusion/mptsas.c: inconsequent NULL checking
Date: Mon, 19 Mar 2007 10:24:49 +0100	[thread overview]
Message-ID: <20070319092449.GM752@stusta.de> (raw)

The Coverity checker spotted the following inconsequent NULL checking in
drivers/message/fusion/mptsas.c:

<--  snip  -->

...
static void
mptsas_delete_expander_phys(MPT_ADAPTER *ioc)
{
...
                if (port_info->phy_info &&
                    (!(port_info->phy_info[0].identify.device_info &
                    MPI_SAS_DEVICE_INFO_SMP_TARGET)))
                        continue;

                if (mptsas_sas_expander_pg0(ioc, &buffer,
                     (MPI_SAS_EXPAND_PGAD_FORM_HANDLE <<
                     MPI_SAS_EXPAND_PGAD_FORM_SHIFT),
                     port_info->phy_info[0].handle)) {
...

<--  snip  -->

port_info->phy_info is first checked but later dereferenced 
unconditionally.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


                 reply	other threads:[~2007-03-19  9:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20070319092449.GM752@stusta.de \
    --to=bunk@stusta.de \
    --cc=Eric.Moore@lsi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mpt_linux_developer@lsi.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