Re: [sigrok-devel] [PATCH 4/4] zeroplus-logic-cube: Fix USB device list

2016-05-08 Thread Bert Vermeulen
On 05/06/2016 02:08 PM, Lars-Peter Clausen wrote: > The testo driver uses libusb_get_device_list() but neglects to call the > matching libusb_device_list_free() on the error path. This will leak the > memory allocated for the list as well as all the devices. Copy-paste error in the driver name her

[sigrok-devel] [PATCH 3/3] Remove unnecessary std_init() wrapper functions

2016-05-08 Thread Lars-Peter Clausen
Now that the signature of std_init() matches that of the driver init() callback we can remove all wrapper functions around std_init() and use it directly as the init() callback. Signed-off-by: Lars-Peter Clausen --- src/hardware/agilent-dmm/api.c | 7 +-- src/hardware/appa-55i

[sigrok-devel] [PATCH 1/3] Match std_init() parameter order to the driver init() callback

2016-05-08 Thread Lars-Peter Clausen
The std_init() callback has the order of the first two paramters opposite to the init() callback. This is primarily due to historical development. Since the std_init() function is usually called from a driver's init() callback aligning the order will allow direct register pass through rather than

[sigrok-devel] [PATCH 2/3] std_init(): Drop check if pass in driver is non-NULL

2016-05-08 Thread Lars-Peter Clausen
std_init() checks if the pass in struct sr_dev_driver is non-NULL and prints a error message and returns an error if it is NULL. std_init() is exclusively called from driver init() callbacks for which the core already checks if the struct sr_dev_driver is non-NULL before invoking the callback. Thi