net: can: etas_es58x: full cleanup in the error case
Subsystems (2)
PATCH 1/1 net: can: etas_es58x: full cleanup in the error case
Memory allocation can fail in the middle. Hence the cleanup needs to be called in every case.
Fixes 8537257874e94 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces")
Signed-off-by Oliver Neukum <[email protected]>
--- drivers/net/can/usb/etas_es58x/es58x_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/can/usb/etas_es58x/es58x_core.c +2 -1
@@ -1783,8 +1783,9 @@ static int es58x_open(struct net_device *netdev)if (!es58x_dev->opened_channel_cnt) { ret =es58x_alloc_rx_urbs (es58x_dev); +/* can fail partially */ if (ret) -return ret; + goto free_urbs; ret =es58x_set_realtime_diff_ns (es58x_dev);if (ret)
Signature · 1 line
2.53.0
Vincent Mailhol
maintainerQuoted 5 lines · Oliver Neukum
Memory allocation can fail in the middle. Hence the cleanup needs to be called in every case.
Fixes 8537257874e94 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces")Signed-off-by Oliver Neukum <[email protected]>
Did you see my previous message?
Yours sincerely,
Vincent Mailhol
Hi,
sorry for missing your last mail.
Quoted 10 lines · Vincent Mailhol
Quoted 5 lines · Oliver Neukum
Memory allocation can fail in the middle. Hence the cleanup needs to be called in every case.
Fixes 8537257874e94 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces")Signed-off-by Oliver Neukum <[email protected]>Did you see my previous message?
Nice. This is a definite improvement and solves
the issue, but I think it has issues. I will
send in a follow-up.
Regards
Oliver