]> git.baikalelectronics.ru Git - kernel.git/commit
staging: fsl-dpaa2/ethsw: Remove netdevice on port probing error
authorRazvan Stefanescu <razvan.stefanescu@nxp.com>
Fri, 5 Jul 2019 14:27:13 +0000 (17:27 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jul 2019 05:34:13 +0000 (07:34 +0200)
commit2307bdce3d7f20413c91ef4f5bb1a69ebd0a111d
tree1df2bb471dc7c91dc50a9075ff3f0b8cdc867b57
parent4318f052b2d26761f2c13c746b3a48d74dac5816
staging: fsl-dpaa2/ethsw: Remove netdevice on port probing error

If the ethsw_port_init() call failed, the netdevice remains registered in
the system.

Use labels to ensure that netdevice is unregistered and freed in this case.

Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/1562336836-17119-4-git-send-email-ioana.ciornei@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-dpaa2/ethsw/ethsw.c