]> 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)
commit74f16cf91b30aef6c8f380f3b521e773fa2b7336
treef85ae44221e018f1e9dd366b70104642a54f9fe5
parentff508d3b125f2014d7133e8792629560df29fcff
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: 7c77929eaa0c ("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