net/sfc: use more robust string comparison
authorIvan Malov <ivan.malov@oktetlabs.ru>
Mon, 9 Nov 2020 11:46:06 +0000 (14:46 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 18:43:25 +0000 (19:43 +0100)
commit380f3552285fbb1d463802d0b66bc815b1e6fcad
tree3ac6f24ba7ab2cc702ea9071e85f35cf6fb0edc0
parentdf78fe717ef29e0050a56547d512d99915f80090
net/sfc: use more robust string comparison

When it comes to comparing HW switch ID strings,
use strncmp to avoid reading past the buffer.

Fixes: e86b48aa46d4 ("net/sfc: add HW switch ID helpers")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
drivers/net/sfc/sfc.c