diff options
| author | Leon Romanovsky <[email protected]> | 2021-07-21 12:39:44 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2021-07-21 21:35:52 +0000 |
| commit | c2255ff47768c94a0ebc3968f007928bb47ea43b (patch) | |
| tree | b34f0e0a6f72969936ad304dafa0b960a2c07c39 /net/switchdev/switchdev.c | |
| parent | net: bridge: multicast: add context support for host-joined groups (diff) | |
| download | kernel-c2255ff47768c94a0ebc3968f007928bb47ea43b.tar.gz kernel-c2255ff47768c94a0ebc3968f007928bb47ea43b.zip | |
ionic: cleanly release devlink instance
The failure to register devlink will leave the system with dangled
devlink resource, which is not cleaned if devlink_port_register() fails.
In order to remove access to ".registered" field of struct devlink_port,
require both devlink_register and devlink_port_register to success and
check it through device pointer.
Fixes: fbfb8031533c ("ionic: Add hardware init and device commands")
Reviewed-by: Moshe Shemesh <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Acked-by: Shannon Nelson <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
