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.
This commit is contained in:
SPRESENSE 2022-04-11 20:09:30 +09:00 committed by Masayuki Ishikawa
parent 39f7c4aea0
commit c2e45444ff

View File

@ -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;