realtek: remove redundant is_lagmember checks
authorJan Hoffmann <jan@3e8.eu>
Sat, 6 May 2023 23:05:35 +0000 (01:05 +0200)
committerSander Vanheule <sander@svanheule.net>
Sun, 7 May 2023 17:16:07 +0000 (19:16 +0200)
commita872570c043f5beee21c3af695f1a5a77f7eab04
tree33ea47ec36359dac098c58c2f71e1c2808d2d4e1
parent98a3b52380b7c2632c60c54d86d5c562f5eabfe4
realtek: remove redundant is_lagmember checks

All callers of the rtl83xx_mc_group_* functions already do the same
check, so these aren't needed.

For rtl83xx_mc_group_alloc, this branch also incorrectly returned 0
instead of a negative value. If the branch wasn't effectively dead code
anyway, this could potentially have caused bugs, as 0 is a valid
multicast group entry index.

Fixes: cde31976e375 ("realtek: Add support for Layer 2 Multicast")
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c
target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c