Skip to content

platform/api/aws: remove redundant error return from CreateTags - #921

Open
vishnu2ko5 wants to merge 1 commit into
flatcar:mainfrom
vishnu2ko5:fix-codebase-issues
Open

platform/api/aws: remove redundant error return from CreateTags#921
vishnu2ko5 wants to merge 1 commit into
flatcar:mainfrom
vishnu2ko5:fix-codebase-issues

Conversation

@vishnu2ko5

Copy link
Copy Markdown

platform/api/aws: remove redundant error return from CreateTags

In platform/api/aws/ec2.go, the CreateTags function checks if the error from the API call is non-nil and returns early with a wrapped error. However, at the very end of the function, it returns err again instead of nil. This is redundant (since err is guaranteed to be nil at that point) and makes the code slightly confusing.

This PR updates the final return statement to return nil directly, making the intent clearer and avoiding potential bugs if code is ever added between the error check and the return statement in the future.

How to use

Review the code diff to confirm that the logic remains functionally identical, but is clearer to read.

Testing done

Audited the code manually and verified that the success path correctly returns a nil error without altering the failure path behavior.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

Signed-off-by: MrCode-2005 <vishnusajeev2005@gmail.com>
@vishnu2ko5
vishnu2ko5 requested a review from a team as a code owner August 14, 2026 11:15
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.

1 participant