]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
CHROMIUM: ata: libata-core: initialize native_sectors in ata_hpa_resize()
authorSimon Que <sque@chromium.org>
Thu, 17 Jan 2013 00:07:52 +0000 (16:07 -0800)
committerChromeBot <chrome-bot@google.com>
Tue, 29 Jan 2013 23:27:22 +0000 (15:27 -0800)
Eliminates a compiler warning about uninitialized variable:
"warning: 'native_sectors' may be used uninitialized in this function"

This has been submitted for review upstream, but not yet accepted.

BUG=chromium-os:5542
TEST=emerge chromeos-kernel, make sure the warning doesn't appear

Change-Id: Ic791f8053c468e74445e07a306c76cd9e9e5494b
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41948
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
drivers/ata/libata-core.c

index 9d153d7a6a4612cb836d711c16ae590f2a597451..fa42d6b063908769b52d824e08555f07ca3bdd17 100644 (file)
@@ -1322,7 +1322,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? */