diff --git a/drivers/input/misc/vl53L0/src/vl53l010_api.c b/drivers/input/misc/vl53L0/src/vl53l010_api.c index 87cc13ba9e22..2483bf891e72 100644 --- a/drivers/input/misc/vl53L0/src/vl53l010_api.c +++ b/drivers/input/misc/vl53L0/src/vl53l010_api.c @@ -615,12 +615,12 @@ VL53L0_Error VL53L010_StaticInit(VL53L0_DEV Dev) if (Status == VL53L0_ERROR_NONE) Status = VL53L0_WrByte(Dev, 0x88, 0x00); - /* this function do nothing if it has been called before */ + /* this function do nothing if it has been called before */ + if (Status == VL53L0_ERROR_NONE) Status = VL53L010_get_info_from_device(Dev); - if (Status == VL53L0_ERROR_NONE) { + if (Status == VL53L0_ERROR_NONE) Revision = VL53L010_GETDEVICESPECIFICPARAMETER(Dev, Revision); - } if (Status == VL53L0_ERROR_NONE) { if (Revision == 0)