Skip to contentSkip to conversation

ata: libata-core: initialize native_sectors in ata_hpa_resize()

PATCH Superseded Simon Que 1 participant 1 message Jan 17, 2013 1 message not in the archive libata

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 50F7E92C.8070409 () mvista ! com

Simon Que

author
#1 lore raw

PATCH v2 1/1 ata: libata-core: initialize native_sectors in ata_hpa_resize()

Eliminates a compiler warning about uninitialized variable.

---
 drivers/ata/libata-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/ata/libata-core.c +1 -1
index d2b18ea..b185db1 100644
@@ -1324,7 +1324,7 @@ static int ata_hpa_resize(struct ata_device *dev)
 	int print_info = ehc->i.flags & ATA_EHI_PRINTINFO;
 	bool unlock_hpa = ata_ignore_hpa || dev->flags & ATA_DFLAG_UNLOCK_HPA;
 	u64 sectors = ata_id_n_sectors(dev->id);
-	u64 native_sectors;
+	u64 native_sectors = 0;
 	int rc;
 
 	/* do we need to do it? */
Signature · 1 line
1.7.8.6