2
0
Эх сурвалжийг харах

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 <[email protected]>
Rafał Mikrut 5 жил өмнө
parent
commit
561bfc96f9

+ 1 - 0
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: