AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 26 Bitcoin

power: release PMU devices before deleting the i2c bus on M5CoreS3

Public commit record

What the developer wrote

Authored by Gustavo Cateim

100/100 · Strong
power: release PMU devices before deleting the i2c bus on M5CoreS3

Since ESP-IDF v5.5 i2c_del_master_bus() refuses to delete a bus that
still has devices attached and returns ESP_ERR_INVALID_STATE. On the
M5CoreS3, power_init() attaches the axp2101 and aw9523 devices and
then deletes the bus without releasing them, so under IDF 5.5.4 the
deinit fails, power_init() propagates the error and the JADE_ASSERT
in main.c aborts the boot. Same root cause as the touchscreen fix in
the previous commit (#306).

Remove both devices from the bus before deleting it.

Not tested on hardware (none available); the change mirrors the
touchscreen fix validated on the Waveshare S3 Touch LCD 2.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a boot failure on the M5CoreS3 hardware. A recent update to the underlying Espressif SDK (ESP-IDF v5.5) changed the rules for deleting an I2C bus: it now refuses to delete a bus that still has devices attached. The power initialization code was attaching two power-management chips to the bus and then trying to delete the bus without detaching them first, causing the device to abort boot. The fix simply detaches those two devices before deleting the bus. There is no security vulnerability here—it's a compatibility/bug fix for a crash-on-boot scenario.

Recommended action

No security action required. Treat as a normal hardware-compatibility bug fix. Verify on M5CoreS3 hardware when available, and consider auditing other I2C bus teardown paths for similar missing device-removal calls under ESP-IDF v5.5+.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 26/100

Our methodology →
Potential impact 8/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 5/15
Confidence 9/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.