Change-Id: Ice65b6724f57d96b9af01c656a3df509a864b958
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
* @retval #USB_HOST_ERROR_NO_SUCH_DEVICE the dev has been disconnected
* @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed
* @retval #USB_HOST_ERROR_NONE Successful
+ * @retval #USB_HOST_ERROR_DEVICE_NOT_OPENED The device was not opened
* @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported
* @post Obtained configuration should be destroyed by usb_host_config_destroy()
* when no longer needed.
return USB_HOST_ERROR_INVALID_PARAMETER;
}
+ if (dev->lusb_dev_handle == NULL) {
+ _E("Device is not opened");
+ return USB_HOST_ERROR_DEVICE_NOT_OPENED;
+ }
+
ret = libusb_get_configuration(dev->lusb_dev_handle, &cfg_nmb);
if (ret < 0) {
ret = translate_error(ret); //LCOV_EXCL_LINE System Error