From 561bfc96f9bb3303791f6620a958d02167abed0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mikrut?= Date: Tue, 8 Dec 2020 22:01:14 +0100 Subject: realtek: Add missing case in switch statement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- target/linux/realtek/files-5.4/drivers/net/ethernet/rtl838x_eth.c | 1 + 1 file changed, 1 insertion(+) (limited to 'target/linux/realtek/files-5.4/drivers') 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: -- cgit v1.2.3