diff options
| author | Colin Ian King <[email protected]> | 2022-02-24 22:05:57 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2022-02-26 06:21:24 +0000 |
| commit | 38455fbcc8ece5d4bdc0e6f380abd88db0b208e6 (patch) | |
| tree | a3e26b806c03cefb8d312946f4295b51d51e7eef /drivers/net/dsa/dsa_loop.c | |
| parent | Merge branch 'sja1105-phylink-updates' (diff) | |
| download | kernel-38455fbcc8ece5d4bdc0e6f380abd88db0b208e6.tar.gz kernel-38455fbcc8ece5d4bdc0e6f380abd88db0b208e6.zip | |
net: dsa: qca8k: return with -EINVAL on invalid port
Currently an invalid port throws a WARN_ON warning however invalid
uninitialized values in reg and cpu_port_index are being used later
on. Fix this by returning -EINVAL for an invalid port value.
Addresses clang-scan warnings:
drivers/net/dsa/qca8k.c:1981:3: warning: 2nd function call argument is an
uninitialized value [core.CallAndMessage]
drivers/net/dsa/qca8k.c:1999:9: warning: 2nd function call argument is an
uninitialized value [core.CallAndMessage]
Fixes: 7544b3ff745b ("net: dsa: qca8k: move pcs configuration")
Signed-off-by: Colin Ian King <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/dsa/dsa_loop.c')
0 files changed, 0 insertions, 0 deletions
