]> git.itanic.dy.fi Git - linux-stable/commit
net: dsa: sja1105: propagate exact error code from sja1105_dynamic_config_poll_valid()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 8 Sep 2023 13:33:49 +0000 (16:33 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Sep 2023 07:32:30 +0000 (08:32 +0100)
commitc956798062b5a308db96e75157747291197f0378
tree2b4fb00dc90a1f3a8abe6c2b6b5a74f465163f4f
parent02c652f5465011126152bbd93b6a582a1d0c32f1
net: dsa: sja1105: propagate exact error code from sja1105_dynamic_config_poll_valid()

Currently, sja1105_dynamic_config_wait_complete() returns either 0 or
-ETIMEDOUT, because it just looks at the read_poll_timeout() return code.

There will be future changes which move some more checks to
sja1105_dynamic_config_poll_valid(). It is important that we propagate
their exact return code (-ENOENT, -EINVAL), because callers of
sja1105_dynamic_config_read() depend on them.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105_dynamic_config.c