diff options
author | David S. Miller <davem@davemloft.net> | 2019-10-05 13:37:23 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-05 13:37:23 -0700 |
commit | 6f4c930e02355664d89c976eccea5d999a90de16 (patch) | |
tree | bc08932fbf43b9560ba5bde3284674054e3b56eb /drivers/net/dsa/sja1105/sja1105_spi.c | |
parent | 26e0105550862a137eba701e2f4e3eeb343759e9 (diff) | |
parent | 2d00aee21a5d4966e086d98f9d710afb92fb14e8 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105_spi.c')
-rw-r--r-- | drivers/net/dsa/sja1105/sja1105_spi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_spi.c b/drivers/net/dsa/sja1105/sja1105_spi.c index 423ee7eedd8c..b224b1a55695 100644 --- a/drivers/net/dsa/sja1105/sja1105_spi.c +++ b/drivers/net/dsa/sja1105/sja1105_spi.c @@ -423,7 +423,8 @@ int sja1105_static_config_upload(struct sja1105_private *priv) rc = static_config_buf_prepare_for_upload(priv, config_buf, buf_len); if (rc < 0) { dev_err(dev, "Invalid config, cannot upload\n"); - return -EINVAL; + rc = -EINVAL; + goto out; } /* Prevent PHY jabbering during switch reset by inhibiting * Tx on all ports and waiting for current packet to drain. @@ -432,7 +433,8 @@ int sja1105_static_config_upload(struct sja1105_private *priv) rc = sja1105_inhibit_tx(priv, port_bitmap, true); if (rc < 0) { dev_err(dev, "Failed to inhibit Tx on ports\n"); - return -ENXIO; + rc = -ENXIO; + goto out; } /* Wait for an eventual egress packet to finish transmission * (reach IFG). It is guaranteed that a second one will not |