net: renesas: rswitch: Fix the output value of quote from rswitch_rx()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Wed, 15 Mar 2023 07:04:23 +0000 (16:04 +0900)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Mar 2023 07:50:50 +0000 (07:50 +0000)
commite05bb97d9c9dd4ba5739a27921044c935a7fb3be
treed9c49c38558f3f30bd44d32d913b3d3dc1d388f7
parent90de546d9a0b3c771667af18bb3f80567eabb89b
net: renesas: rswitch: Fix the output value of quote from rswitch_rx()

If the RX descriptor doesn't have any data, the output value of quote
from rswitch_rx() will be increased unexpectedily. So, fix it.

Reported-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/rswitch.c