Skip to content

iio: trx-rf: ad9088: Fix uninitialized dev_clk local variable in probe#3305

Merged
nunojsa merged 1 commit intoxlnx/release/v6.12.y-2026r1from
xlnx/release/fix/iio-ad9088-stale-clock
May 5, 2026
Merged

iio: trx-rf: ad9088: Fix uninitialized dev_clk local variable in probe#3305
nunojsa merged 1 commit intoxlnx/release/v6.12.y-2026r1from
xlnx/release/fix/iio-ad9088-stale-clock

Conversation

@nunojsa
Copy link
Copy Markdown
Collaborator

@nunojsa nunojsa commented May 4, 2026

Commit 92e2dca ("iio: trx-rf: ad9088: Update API v2.0.10, FW v2.0.6, device-profile v10.1.3") stored the dev_clk pointer in struct ad9088_phy and used phy->dev_clk for get/configure/enable, but probe() already had a local dev_clk variable that is passed to __clk_get_name() later. This left the local variable uninitialized, triggering a -Wuninitialized warning and potential undefined behavior.

Fix this by using the local variable consistently and dropping the now-unused struct member.

Fixes: 92e2dca ("iio: trx-rf: ad9088: Update API v2.0.10, FW v2.0.6, device-profile v10.1.3")

(cherry picked from commit 6422dfe)

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

Commit 92e2dca ("iio: trx-rf: ad9088: Update API v2.0.10, FW
v2.0.6, device-profile v10.1.3") stored the dev_clk pointer in struct
ad9088_phy and used phy->dev_clk for get/configure/enable, but probe()
already had a local `dev_clk` variable that is passed to
__clk_get_name() later. This left the local variable uninitialized,
triggering a -Wuninitialized warning and potential undefined behavior.

Fix this by using the local variable consistently and dropping the
now-unused struct member.

Fixes: 92e2dca ("iio: trx-rf: ad9088: Update API v2.0.10, FW v2.0.6, device-profile v10.1.3")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
(cherry picked from commit 6422dfe)
Copy link
Copy Markdown
Collaborator

@gastmaier gastmaier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. thanks!

@nunojsa nunojsa merged commit f866812 into xlnx/release/v6.12.y-2026r1 May 5, 2026
43 of 47 checks passed
@nunojsa nunojsa deleted the xlnx/release/fix/iio-ad9088-stale-clock branch May 5, 2026 08:24
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