All of lore.kernel.org
 help / color / mirror / Atom feed
* libata-scsi.c: new check-after-use
@ 2008-01-14 21:08 Adrian Bunk
  2008-01-14 23:46 ` [PATCH #upstream-fixes] libata: relocate sdev->manage_start_stop configuration Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2008-01-14 21:08 UTC (permalink / raw)
  To: Ondrej Zary, Tejun Heo, Jeff Garzik; +Cc: linux-ide, linux-kernel


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-14 23:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-14 21:08 libata-scsi.c: new check-after-use Adrian Bunk
2008-01-14 23:46 ` [PATCH #upstream-fixes] libata: relocate sdev->manage_start_stop configuration Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.