aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek
diff options
context:
space:
mode:
authorRafał Mikrut <mikrutrafal@protonmail.com>2020-12-08 22:01:14 +0100
committerPetr Štetiar <ynezz@true.cz>2020-12-11 13:48:24 +0100
commit561bfc96f9bb3303791f6620a958d02167abed0f (patch)
tree58ade9127fe99ba429f4ccb16b83278947479214 /target/linux/realtek
parent848d668427c544d20f8aa3041fa11b4d4adc9bc8 (diff)
downloadupstream-561bfc96f9bb3303791f6620a958d02167abed0f.tar.gz
upstream-561bfc96f9bb3303791f6620a958d02167abed0f.tar.bz2
upstream-561bfc96f9bb3303791f6620a958d02167abed0f.zip
realtek: Add missing case in switch statement
Cppcheck shows here duplicated break. Code `state->speed = SPEED_1000;` will be never executed because above it there is break statement. Almost identical statement is placed in another realtek driver https://github.com/openwrt/openwrt/blob/18a53d43d646290053eff4736ec852efcf6bf510/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c#L286-L294 Signed-off-by: Rafał Mikrut <mikrutrafal@protonmail.com>
Diffstat (limited to 'target/linux/realtek')
-rw-r--r--target/linux/realtek/files-5.4/drivers/net/ethernet/rtl838x_eth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/linux/realtek/files-5.4/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-5.4/drivers/net/ethernet/rtl838x_eth.c
index d53d5dec12..fec842674e 100644
--- a/target/linux/realtek/files-5.4/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-5.4/drivers/net/ethernet/rtl838x_eth.c
@@ -986,6 +986,7 @@ static int rtl838x_mac_pcs_get_state(struct phylink_config *config,
case 1:
state->speed = SPEED_100;
break;
+ case 2:
state->speed = SPEED_1000;
break;
default: