drivers/mpu60x0 Fix the error when mpu60x0 in SPI case

This commit is contained in:
zouboan 2023-04-11 16:23:14 +08:00 committed by Xiang Xiao
parent 44a04733d4
commit 9bc3a9e4bb

View File

@ -661,7 +661,7 @@ static int mpu_reset(FAR struct mpu_dev_s *dev)
/* Awaken chip, issue hardware reset */
ret = __mpu_write_pwr_mgmt_1(dev, PWR_MGMT_1__DEVICE_RESET);
if (ret != OK)
if (ret < 0)
{
nxmutex_unlock(&dev->lock);
snerr("Could not find mpu60x0!\n");