Skip to content

clk: adi: fix invalid IS_ERR() checks of of_iomap() in SC5xx clock drivers#3236

Merged
qasim-ijaz merged 4 commits intoadsp-6.12.0-yfrom
adsp-clk-iserr-fix
Apr 13, 2026
Merged

clk: adi: fix invalid IS_ERR() checks of of_iomap() in SC5xx clock drivers#3236
qasim-ijaz merged 4 commits intoadsp-6.12.0-yfrom
adsp-clk-iserr-fix

Conversation

@qasim-ijaz
Copy link
Copy Markdown

of_iomap() returns NULL on failure, but the ADI SC5xx clock drivers
check its return value with IS_ERR(). As a result, failed mappings are
not detected correctly. Fix this by replacing the IS_ERR() checks with
NULL checks.

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have compiled my changes, including the documentation
  • I have tested the changes on the relevant hardware
  • I have updated the documentation outside this repo accordingly
  • I have provided links for the relevant upstream lore

of_iomap() returns NULL on failure, not an error pointer. Replace the
IS_ERR() checks with NULL checks in sc57x_clock_probe().

Fixes: df2ba6d ("clk: adi: Add clock driver for ADSP-SC573")
Signed-off-by: Qasim Ijaz <qasim.ijaz@analog.com>
of_iomap() returns NULL on failure, not an error pointer. Replace the
IS_ERR() checks with NULL checks in sc58x_clock_probe().

Fixes: b288b42 ("clk: adi: Add clock driver for ADSP-SC589")
Signed-off-by: Qasim Ijaz <qasim.ijaz@analog.com>
of_iomap() returns NULL on failure, not an error pointer. Replace the
IS_ERR() checks with NULL checks in sc594_clock_probe().

Fixes: 9cf6b0c ("clk: adi: Add clock driver for ADSP-SC594")
Signed-off-by: Qasim Ijaz <qasim.ijaz@analog.com>
of_iomap() returns NULL on failure, not an error pointer. Replace the
IS_ERR() checks with NULL checks in sc598_clock_probe().

Fixes: 71b82fe ("clock: Add driver for ADSP-SC5xx")
Signed-off-by: Qasim Ijaz <qasim.ijaz@analog.com>
@qasim-ijaz qasim-ijaz requested review from a team, mhennerich, nunojsa and pamolloy April 7, 2026 12:26
@qasim-ijaz qasim-ijaz merged commit 5f138ef into adsp-6.12.0-y Apr 13, 2026
14 checks passed
@qasim-ijaz qasim-ijaz deleted the adsp-clk-iserr-fix branch April 13, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants