mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-08-19 21:43:17 +08:00
_dac_control() checked the enabled callback before invoking disabled for RT_DAC_CMD_DISABLE. That can reject DAC drivers that provide a disable callback without enable, and can call through a NULL disabled callback when only enable is implemented. Check the disabled callback in the disable command path so the guard matches the operation being dispatched. Generated-by: OpenAI Codex Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>