X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=device.c;h=fea3d60bedfc235f87e59f5d5f6ba958a897892c;hb=340cfac0f0629aa3ee84a0a4db53381d04079fe3;hp=a1556aa4e37244cb57bdf97f7ec644771cc70b7a;hpb=86f5e3d826fc9059e110f07221cb1a30652ceac2;p=libsigrok.git diff --git a/device.c b/device.c index a1556aa4..fea3d60b 100644 --- a/device.c +++ b/device.c @@ -61,12 +61,18 @@ int sr_device_plugin_init(struct sr_device_plugin *plugin) void sr_device_close_all(void) { + int ret; struct sr_device *device; while (devices) { device = devices->data; - if (device->plugin && device->plugin->closedev) - device->plugin->closedev(device->plugin_index); + if (device->plugin && device->plugin->closedev) { + ret = device->plugin->closedev(device->plugin_index); + if (ret != SR_OK) { + sr_err("dev: %s: could not close device %d", + __func__, device->plugin_index); + } + } sr_device_destroy(device); } }