diff options
author | Ioana Radulescu <ruxandra.radulescu@nxp.com> | 2017-06-09 08:48:47 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:37 (GMT) |
commit | cd2d57ebb9e63f35e53e6f9fb15feeed2eaa067d (patch) | |
tree | 274c98b21b34431e916d1cc49e39042624f81536 /drivers | |
parent | fa423df32ca99e923339d58ea679c074446fae0c (diff) | |
download | linux-cd2d57ebb9e63f35e53e6f9fb15feeed2eaa067d.tar.xz |
staging: fsl-dpaa2/eth: Fix use of uninitialized priv fields
Private structure fields "hash_fields" and "num_hash_fields" were
used in check_cls_support() even though they were initialized
later.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 96fd41e..dd33403 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -2442,14 +2442,14 @@ static int bind_dpni(struct dpaa2_eth_priv *priv) /* Verify classification options and disable hashing and/or * flow steering support in case of invalid configuration values */ + priv->hash_fields = default_hash_fields; + priv->num_hash_fields = ARRAY_SIZE(default_hash_fields); check_cls_support(priv); /* have the interface implicitly distribute traffic based on * a static hash key */ if (dpaa2_eth_hash_enabled(priv)) { - priv->hash_fields = default_hash_fields; - priv->num_hash_fields = ARRAY_SIZE(default_hash_fields); err = set_hash(priv); if (err) { dev_err(dev, "Hashing configuration failed\n"); |