WSL2-Linux-Kernel/drivers/net/ethernet/pensando
Leon Romanovsky c2255ff477 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: fbfb803153 ("ionic: Add hardware init and device commands")
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Acked-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-07-21 14:35:52 -07:00
..
ionic ionic: cleanly release devlink instance 2021-07-21 14:35:52 -07:00
Kconfig ionic: fix ptp support config breakage 2021-05-11 16:20:27 -07:00
Makefile ionic: Add basic framework for IONIC Network device driver 2019-09-05 09:24:43 +02:00