[PATCH] Fix Trivial Warnining in drivers/ata/libata-scsi.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jeff,

I observed the following warning for drivers/ata/libata-scsi.c:

drivers/ata/libata-scsi.c: In function â??ata_scsi_scan_hostâ??:
drivers/ata/libata-scsi.c:3272: warning: â??devâ?? may be used uninitialized in this function
---

In most instances=>
	struct ata_device *dev
has been initialized except the above instance. My trivial patch below fixes this.
Please include it if you like it.

To: Jeff Garzik <jgarzik@xxxxxxxxx>
Cc: linux-ide@xxxxxxxxxxxxxxx
Cc: Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx>
Cc: Sachin P Sant <sachinp@xxxxxxxxxxxxxxxxxx>
Signed-Off-By: Subrata Modak <subrata@xxxxxxxxxxxxxxxxxx>
---

--- a/drivers/ata/libata-scsi.c	2009-04-27 11:39:27.000000000 +0530
+++ b/drivers/ata/libata-scsi.c	2009-04-27 15:52:17.000000000 +0530
@@ -3269,7 +3269,7 @@ void ata_scsi_scan_host(struct ata_port 
 	int tries = 5;
 	struct ata_device *last_failed_dev = NULL;
 	struct ata_link *link;
-	struct ata_device *dev;
+	struct ata_device *dev = NULL;
 
 	if (ap->flags & ATA_FLAG_DISABLED)
 		return;

---
Regards--
Subrata

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux