This is an automated email from the ASF dual-hosted git repository.

masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit c2e45444ff0f0591a1648b5a511944dac7328133
Author: SPRESENSE <[email protected]>
AuthorDate: Mon Apr 11 20:09:30 2022 +0900

    boards: cxd56xx: Fix an issue i2c tool not working
    
    It caused i2c tool not to work due to i2c uninitializing processing.
    Since this process is not necessary in the normal case, we will
    move it to the error case.
---
 boards/arm/cxd56xx/common/src/cxd56_i2cdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/boards/arm/cxd56xx/common/src/cxd56_i2cdev.c 
b/boards/arm/cxd56xx/common/src/cxd56_i2cdev.c
index 38eb039564..4d3b1bd294 100644
--- a/boards/arm/cxd56xx/common/src/cxd56_i2cdev.c
+++ b/boards/arm/cxd56xx/common/src/cxd56_i2cdev.c
@@ -62,6 +62,7 @@ int board_i2cdev_initialize(int port)
   if (ret < 0)
     {
       _err("ERROR: Failed to register i2c%d: %d\n", port, ret);
+      cxd56_i2cbus_uninitialize(i2c);
     }
 
   return ret;

Reply via email to