]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sfc: initialise found bitmap in efx_ef10_mtd_probe
authorBert Kenward <bkenward@solarflare.com>
Tue, 12 Feb 2019 13:10:00 +0000 (13:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Feb 2019 16:49:21 +0000 (11:49 -0500)
The bitmap of found partitions in efx_ef10_mtd_probe was not
initialised, causing partitions to be suppressed based off whatever
value was in the bitmap at the start.

Fixes: 3366463513f5 ("sfc: suppress duplicate nvmem partition types in efx_ef10_mtd_probe")
Signed-off-by: Bert Kenward <bkenward@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ef10.c

index 2f2bda68d861492cc6f42cbe27ca9b0cf0f46b80..c08034154a9ae6e8707daa73e1977cfae306da81 100644 (file)
@@ -6115,7 +6115,7 @@ static int efx_ef10_mtd_probe_partition(struct efx_nic *efx,
 static int efx_ef10_mtd_probe(struct efx_nic *efx)
 {
        MCDI_DECLARE_BUF(outbuf, MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX);
-       DECLARE_BITMAP(found, EF10_NVRAM_PARTITION_COUNT);
+       DECLARE_BITMAP(found, EF10_NVRAM_PARTITION_COUNT) = { 0 };
        struct efx_mcdi_mtd_partition *parts;
        size_t outlen, n_parts_total, i, n_parts;
        unsigned int type;