Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soundwire: stream: check return value #4576

Closed

Conversation

bardliao
Copy link
Collaborator

@bardliao bardliao commented Sep 7, 2023

sdw_fill_msg could return error.

sdw_fill_msg could return error.

Signed-off-by: Bard Liao <[email protected]>
Copy link

@RanderWang RanderWang left a comment

Choose a reason for hiding this comment

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

LGTM

ret = sdw_fill_msg(wr_msg, NULL, addr, 1, SDW_BROADCAST_DEV_NUM,
SDW_MSG_FLAG_WRITE, wbuf);
if (ret < 0)
return ret;
Copy link

@RanderWang RanderWang Sep 7, 2023

Choose a reason for hiding this comment

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

will ret > 0 ? no ? why not if (ret) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will ret > 0 ? no ? why not if (ret) ?

ret will never > 0. However, use if (ret < 0) can keep consistent.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think any error can be returned here given the parameters given.

This is a false positive IMHO.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think any error can be returned here given the parameters given.

This is a false positive IMHO.

Indeed, let me close the PR.

@bardliao bardliao closed this Sep 8, 2023
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.

3 participants