aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/xilinx/ll_temac_main.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-05-03 15:39:48 +0300
committerDavid S. Miller <davem@davemloft.net>2019-05-05 10:25:52 -0700
commitfdd1a8103a6df50bdeacd8bb04c3f6976cb9ae41 (patch)
treee3cb2e36234846a202687b87f6b29b029bf8ab0d /drivers/net/ethernet/xilinx/ll_temac_main.c
parentMerge tag 'wireless-drivers-next-for-davem-2019-05-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next (diff)
downloadlinux-dev-fdd1a8103a6df50bdeacd8bb04c3f6976cb9ae41.tar.xz
linux-dev-fdd1a8103a6df50bdeacd8bb04c3f6976cb9ae41.zip
net: atm: clean up a range check
The code works fine but the problem is that check for negatives is a no-op: if (arg < 0) i = 0; The "i" value isn't used. We immediately overwrite it with: i = array_index_nospec(arg, MAX_LEC_ITF); The array_index_nospec() macro returns zero if "arg" is out of bounds so this works, but the dead code is confusing and it doesn't look very intentional. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xilinx/ll_temac_main.c')
0 files changed, 0 insertions, 0 deletions