net/nfb: check array size before access
authorMartin Spinler <spinler@cesnet.cz>
Wed, 1 Apr 2020 06:38:01 +0000 (08:38 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:06 +0000 (13:57 +0200)
commitdc7920c76c1cabf702df03a20d15a5dc89b38fea
treef705e550ad763a041fc82f4799f9ca1356924ba7
parent40dce592f1db2d243ca4bb0afed8a8039d907d2d
net/nfb: check array size before access

The driver wrongly assumed the presence of at least one rxmac in every
firmware and accessed to non-existing unit

Signed-off-by: Martin Spinler <spinler@cesnet.cz>
Acked-by: Jakub Neruda <neruda@netcope.com>
drivers/net/nfb/nfb_rxmode.c