summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2023-07-07 14:43:10 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2023-07-17 13:16:15 +0300
commit2603be9e8167ddc7bea95dcfab9ffc33414215aa (patch)
tree579efd96f3d8a287eca70c43f41be0e1d387305a /tools/perf/scripts/python/export-to-postgresql.py
parent0dd1805fe498e0cf64f68e451a8baff7e64494ec (diff)
downloadlinux-2603be9e8167ddc7bea95dcfab9ffc33414215aa.tar.xz
can: gs_usb: gs_can_open(): improve error handling
The gs_usb driver handles USB devices with more than 1 CAN channel. The RX path for all channels share the same bulk endpoint (the transmitted bulk data encodes the channel number). These per-device resources are allocated and submitted by the first opened channel. During this allocation, the resources are either released immediately in case of a failure or the URBs are anchored. All anchored URBs are finally killed with gs_usb_disconnect(). Currently, gs_can_open() returns with an error if the allocation of a URB or a buffer fails. However, if usb_submit_urb() fails, the driver continues with the URBs submitted so far, even if no URBs were successfully submitted. Treat every error as fatal and free all allocated resources immediately. Switch to goto-style error handling, to prepare the driver for more per-device resource allocation. Cc: stable@vger.kernel.org Cc: John Whittington <git@jbrengineering.co.uk> Link: https://lore.kernel.org/all/20230716-gs_usb-fix-time-stamp-counter-v1-1-9017cefcd9d5@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions