]> git.baikalelectronics.ru Git - kernel.git/commit
net: fec: validate the new settings in fec_enet_set_coalesce()
authorJakub Kicinski <kuba@kernel.org>
Wed, 11 Mar 2020 03:36:16 +0000 (20:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2020 06:17:40 +0000 (07:17 +0100)
commit3b24474414830e364c5fefa670d457db181f6ff8
tree37ca4e306a00094fe2b32dae8a45980e062ee42b
parentf7332735d0064499a5c3eff0fb6b7b4f872ae39e
net: fec: validate the new settings in fec_enet_set_coalesce()

[ Upstream commit 2ae155e7eeb8367990fdffda5c5c5b5ccc99aeb7 ]

fec_enet_set_coalesce() validates the previously set params
and if they are within range proceeds to apply the new ones.
The new ones, however, are not validated. This seems backwards,
probably a copy-paste error?

Compile tested only.

Fixes: a9b28f44efbb ("net: fec: add interrupt coalescence feature support")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/freescale/fec_main.c