diff --git a/esphome/components/ld2412/ld2412.cpp b/esphome/components/ld2412/ld2412.cpp index a4099c45b1f..1deb0075a6f 100644 --- a/esphome/components/ld2412/ld2412.cpp +++ b/esphome/components/ld2412/ld2412.cpp @@ -310,6 +310,8 @@ void LD2412Component::restart_and_read_all_info() { } void LD2412Component::loop() { + // Early return avoids stack adjustment for the batch buffer below. + // loop() runs ~7000/min so most calls have nothing to read. int avail = this->available(); if (avail <= 0) { return;