]> git.baikalelectronics.ru Git - kernel.git/commit
net: marvell: prestera: fix incorrect return of port_find
authorYevhen Orlov <yevhen.orlov@plvision.eu>
Thu, 16 Dec 2021 17:07:36 +0000 (19:07 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 18 Dec 2021 03:19:00 +0000 (19:19 -0800)
commit854cfa790ef3257451b213167160dab81c7a95d9
treef85ae44221e018f1e9dd366b70104642a54f9fe5
parent9c7ef62a440572f749d87eefc1e34348883fcf5c
net: marvell: prestera: fix incorrect return of port_find

In case, when some ports is in list and we don't find requested - we
return last iterator state and not return NULL as expected.

Fixes: 9c65bff66af7 ("net: marvell: prestera: Add driver for Prestera family ASIC devices")
Signed-off-by: Yevhen Orlov <yevhen.orlov@plvision.eu>
Link: https://lore.kernel.org/r/20211216170736.8851-1-yevhen.orlov@plvision.eu
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/prestera/prestera_main.c