]> git.baikalelectronics.ru Git - kernel.git/commit
net: switchdev: fix return code of fdb_dump stub
authorDragos Tatulea <dragos@endocode.com>
Mon, 16 Nov 2015 09:52:48 +0000 (10:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Nov 2015 20:24:37 +0000 (15:24 -0500)
commit4fd1cf50994962a5726039aca5c9367d031012e9
tree14c4d8df3dc359e0921723ebc299a0866bb38ffe
parent450aeee82ce1e05dbe255770f2f17a9365df0883
net: switchdev: fix return code of fdb_dump stub

rtnl_fdb_dump always expects an index to be returned by the ndo_fdb_dump op,
but when CONFIG_NET_SWITCHDEV is off, it returns an error.

Fix that by returning the given unmodified idx.

A similar fix was a09f3ab2eda8 ("switchdev: fix return value of
switchdev_port_fdb_dump in case of error") but for the CONFIG_NET_SWITCHDEV=y
case.

Fixes: 6fd659d1d1a8 ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops.")
Signed-off-by: Dragos Tatulea <dragos@endocode.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/switchdev.h