]> git.baikalelectronics.ru Git - kernel.git/commit
can: gs_usb: gs_make_candev(): clean up error handling
authorMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 18 Sep 2022 20:59:27 +0000 (22:59 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 23 Sep 2022 11:55:00 +0000 (13:55 +0200)
commit84a925af05a7c78df9ccb63a4dcbdb19c569ef39
treece5f055f21dd80e33736b51072de28daf59705b9
parenteb79e86cf0bea0b53391fbef055a4ee793ea0a1e
can: gs_usb: gs_make_candev(): clean up error handling

Introduce a label to free the allocated candev in case of an error and
make use of if. Fix a memory leak if the extended bit timing cannot be
read. Extend the error messages to print the number of the failing
channel and the symbolic error name.

Link: https://lore.kernel.org/all/20220921193902.575416-4-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/gs_usb.c