]> git.sur5r.net Git - u-boot/commitdiff
drivers: net: ldpaa: Memset pools_params as "0" before use
authorPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Mon, 28 Mar 2016 08:41:05 +0000 (14:11 +0530)
committerJoe Hershberger <joe.hershberger@ni.com>
Tue, 3 May 2016 22:52:11 +0000 (17:52 -0500)
Memset pools_params as "0" to avoid garbage value in dpni_set_pools.

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reported-by: Jose Rivera <german.rivera@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/ldpaa_eth/ldpaa_eth.c

index bc7f8bb023c16c0594a56fb8bf13376fa7d53677..75b2b6b04966bbdb2e9dc3fedba04a4204858e3a 100644 (file)
@@ -920,6 +920,7 @@ static int ldpaa_dpni_bind(struct ldpaa_eth_priv *priv)
        struct dpni_tx_conf_cfg tx_conf_cfg;
        int err = 0;
 
+       memset(&pools_params, 0, sizeof(pools_params));
        pools_params.num_dpbp = 1;
        pools_params.pools[0].dpbp_id = (uint16_t)dflt_dpbp->dpbp_attr.id;
        pools_params.pools[0].buffer_size = LDPAA_ETH_RX_BUFFER_SIZE;