Skip to content

drivers: amplifiers: ada4250: fix resource leak in ada4250_init#3061

Merged
amiclaus merged 1 commit intomainfrom
staging/bug-3-fix-ada4250-resource-leak
Apr 20, 2026
Merged

drivers: amplifiers: ada4250: fix resource leak in ada4250_init#3061
amiclaus merged 1 commit intomainfrom
staging/bug-3-fix-ada4250-resource-leak

Conversation

@amiclaus
Copy link
Copy Markdown
Contributor

@amiclaus amiclaus commented Apr 7, 2026

Several error paths in ada4250_init() either return directly or jump to error_dev, bypassing cleanup of already-initialized GPIOs and SPI resources. Route all error paths through the appropriate cleanup labels to ensure proper resource release on failure.

Fixes: 014488c ("drivers: amplifiers: add ada4230 support")

Pull Request Description

Please replace this with a detailed description and motivation of the changes.
You can tick the checkboxes below with an 'x' between square brackets or just check them after publishing the PR.
If this PR contains a breaking change, list dependent PRs and try to push all related PRs at the same time.

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)

PR Checklist

  • I have followed the Coding style guidelines
  • I have complied with the Submission Checklist
  • I have performed a self-review of the changes
  • I have commented my code, at least hard-to-understand parts
  • I have build all projects affected by the changes in this PR
  • I have tested in hardware affected projects, at the relevant boards
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe etc), if applies

Several error paths in ada4250_init() either return directly or jump
to error_dev, bypassing cleanup of already-initialized GPIOs and
SPI resources. Route all error paths through the appropriate cleanup
labels to ensure proper resource release on failure.

Fixes: 014488c ("drivers: amplifiers: add ada4230 support")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
@amiclaus amiclaus merged commit 0202fca into main Apr 20, 2026
16 of 19 checks passed
@amiclaus amiclaus deleted the staging/bug-3-fix-ada4250-resource-leak branch April 20, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants