royzah opened a new pull request, #20406: URL: https://github.com/apache/nuttx/pull/20406
## Why `pwm_update_duty()` let a negative channel through on FlexIO and TPM, and TPM also took `n_channels + 1`, writing registers outside the timer. TPM `pwm_start()` then dropped the error and returned `OK`. ## How Accept `1..n` on both. TPM returns what it got. Plus one `nxstyle` blank line. ## Tested i.MX93, `PWMIOC_SETCHARACTERISTICS` then `PWMIOC_START` with channel -2: | | TPM | FlexIO | | --- | --- | --- | | before | SError, kernel panic | not reached | | after | `-EINVAL` | `-EINVAL` | ``` arm64_fatal_handler: PANIC: Unhandled user exception in PID 1346: tests arm64_fatal_handler: Reason: SError - SError interrupt ``` `tools/checkpatch.sh` clean. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
