can: etas_es58x: add es58x_free_netdevs() to factorize code
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>
Mon, 28 Jun 2021 15:54:18 +0000 (00:54 +0900)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 25 Jul 2021 09:36:28 +0000 (11:36 +0200)
commit004653f0abf202072e1d855d3556dff60784effc
tree4d063cfec74f1ef400b212e628d93d1003955a27
parent6bde4c7fd8455101dbba6838a6d11bc4451b9a0d
can: etas_es58x: add es58x_free_netdevs() to factorize code

Both es58x_probe() and es58x_disconnect() use a similar code snippet
to release the netdev resources. Factorize it in an helper function
named es58x_free_netdevs().

Link: https://lore.kernel.org/r/20210628155420.1176217-5-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/etas_es58x/es58x_core.c