devlink: Prevent port_type_set() callback when it's not needed
authorElad Raz <eladr@mellanox.com>
Sun, 23 Oct 2016 15:43:05 +0000 (17:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Oct 2016 21:30:32 +0000 (17:30 -0400)
commit6edf10173a1feb1078f2fc8c655baf9614e83493
treeb8b023d22324234adc9827335650404d79995774
parent89ab88b01bacc5bfc338693da3925504757e7844
devlink: Prevent port_type_set() callback when it's not needed

When a port_type_set() is been called and the new port type set is the same
as the old one, just return success.

Signed-off-by: Elad Raz <eladr@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c