From: Adrian Bunk <bunk@kernel.org>
To: Ondrej Zary <linux@rainbow-software.org>,
Tejun Heo <htejun@gmail.com>, Jeff Garzik <jgarzik@redhat.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: libata-scsi.c: new check-after-use
Date: Mon, 14 Jan 2008 23:08:05 +0200 [thread overview]
Message-ID: <20080114210805.GH9847@does.not.exist> (raw)
Commit 9b8e8de7e59b3a2dab3113d620b52dc8ba890fb3 did:
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -872,7 +872,8 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
ata_scsi_sdev_config(sdev);
- sdev->manage_start_stop = 1;
+ if (dev->class == ATA_DEV_ATA)
+ sdev->manage_start_stop = 1;
if (dev)
ata_scsi_dev_config(sdev, dev);
The Coverity checker spotted that this introduced a check-after-use
for "dev".
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
next reply other threads:[~2008-01-14 21:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-14 21:08 Adrian Bunk [this message]
2008-01-14 23:46 ` [PATCH #upstream-fixes] libata: relocate sdev->manage_start_stop configuration Tejun Heo
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=20080114210805.GH9847@does.not.exist \
--to=bunk@kernel.org \
--cc=htejun@gmail.com \
--cc=jgarzik@redhat.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rainbow-software.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;
as well as URLs for NNTP newsgroup(s).