summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Madieu <john.madieu.xa@bp.renesas.com>2026-04-25 02:47:25 +0000
committerMark Brown <broonie@kernel.org>2026-04-27 06:45:08 +0900
commit54900126ae0a2671f8790a7f95706b9ea95fac4e (patch)
tree51aae42f2fa664f07e8ee4b8a7df6a2cfee29792 /scripts
parent254f49634ee16a731174d2ae34bc50bd5f45e731 (diff)
spi: rzv2h-rspi: Fix silent failure in clock setup error path
rzv2h_rspi_setup_clock() is declared to return u32 but returns -EINVAL when no valid clock parameters are found. Cast to u32, -EINVAL becomes 0xffffffea, which is a non-zero value. The caller in rzv2h_rspi_prepare_message() guards against failure with: rspi->freq = rzv2h_rspi_setup_clock(rspi, speed_hz); if (!rspi->freq) return -EINVAL; Because 0xffffffea is non-zero, the check is bypassed and the controller proceeds to program SPBR/SPCMD with stale values, leading to an unknown bit rate. Return 0 on the failed-search path, consistent with the existing clk_set_rate() failure path which already returns 0. Fixes: 77d931584dd3 ("spi: rzv2h-rspi: make transfer clock rate finding chip-specific") Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com> Link: https://patch.msgid.link/20260425024725.2393632-1-john.madieu.xa@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions