RETVM_IF(i2c == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "i2c handle is NULL");
ret = peripheral_gdbus_i2c_close(i2c);
- if (ret != PERIPHERAL_ERROR_NONE) {
+ if (ret != PERIPHERAL_ERROR_NONE)
_E("Failed to close i2c communcation, ret : %d", ret);
- return ret;
- }
peripheral_interface_i2c_close(i2c);
RETVM_IF(pwm == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "pwm handle is NULL");
ret = peripheral_gdbus_pwm_close(pwm);
- if (ret != PERIPHERAL_ERROR_NONE) {
+ if (ret != PERIPHERAL_ERROR_NONE)
_E("Failed to close PWM chip, continuing anyway, ret : %d", ret);
- return ret;
- }
peripheral_interface_pwm_close(pwm);
RETVM_IF(spi == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "spi handle is NULL");
ret = peripheral_gdbus_spi_close(spi);
- if (ret != PERIPHERAL_ERROR_NONE) {
+ if (ret != PERIPHERAL_ERROR_NONE)
_E("Failed to close SPI device, continuing anyway, ret : %d", ret);
- return ret;
- }
peripheral_interface_spi_close(spi);
RETVM_IF(uart == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "uart handle is NULL");
ret = peripheral_gdbus_uart_close(uart);
- if (ret != PERIPHERAL_ERROR_NONE) {
+ if (ret != PERIPHERAL_ERROR_NONE)
_E("Failed to close uart communication, continuing anyway, ret : %d", ret);
- return ret;
- }
peripheral_interface_uart_close(uart);