linux-stable/drivers/net/ethernet/renesas
Yoshihiro Shimoda 380f9acdf7 net: ethernet: renesas: rswitch: Fix endless loop in error paths
Coverity reported that the error path in rswitch_gwca_queue_alloc_skb()
has an issue to cause endless loop. So, fix the issue by changing
variables' types from u32 to int. After changed the types,
rswitch_tx_free() should use rswitch_get_num_cur_queues() to
calculate number of current queues.

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1527147 ("Control flow issues")
Fixes: 3590918b5d ("net: ethernet: renesas: Add support for "Ethernet Switch"")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20221107081021.2955122-1-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-11-08 17:49:05 -08:00
..
Kconfig net: ethernet: renesas: Add support for "Ethernet Switch" 2022-11-02 12:38:53 +00:00
Makefile net: ethernet: renesas: rswitch: Add R-Car Gen4 gPTP support 2022-11-02 12:38:53 +00:00
ravb.h ravb: Add RZ/G2L MII interface support 2022-09-20 08:39:46 -07:00
ravb_main.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
ravb_ptp.c ptp: ravb: convert to .adjfine and adjust_by_scaled_ppm 2022-10-31 11:14:16 +00:00
rcar_gen4_ptp.c net: ethernet: renesas: rswitch: Add R-Car Gen4 gPTP support 2022-11-02 12:38:53 +00:00
rcar_gen4_ptp.h net: ethernet: renesas: rswitch: Add R-Car Gen4 gPTP support 2022-11-02 12:38:53 +00:00
rswitch.c net: ethernet: renesas: rswitch: Fix endless loop in error paths 2022-11-08 17:49:05 -08:00
rswitch.h net: ethernet: renesas: rswitch: Fix endless loop in error paths 2022-11-08 17:49:05 -08:00
sh_eth.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
sh_eth.h sh_eth: place RX/TX descriptor *enum*s after their *struct*s 2021-03-12 17:50:42 -08:00