net/fm: call fm_port_to_index() with proper checks
authorRotariu Marian-Cristian <marian.rotariu@freescale.com>
Mon, 19 May 2014 07:59:52 +0000 (10:59 +0300)
committerYork Sun <yorksun@freescale.com>
Tue, 22 Jul 2014 23:25:53 +0000 (16:25 -0700)
commit1155d8d853ff8639062651a903ae3062f483dc70
tree29f1b9110dba51eabef1d960e7c8378b1670a66f
parent605714f66998e02cbe3666139a48d83e85fcdc0f
net/fm: call fm_port_to_index() with proper checks

Some of the fm_port_to_index() callers did not check for -1 return value and
used -1 as an array index.

Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
drivers/net/fm/fm.h
drivers/net/fm/init.c