-
Notifications
You must be signed in to change notification settings - Fork 288
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
Additional input parameter checks for APIs #408
Conversation
c1f7e2f
to
1381fbb
Compare
Discussion regarding these checks is greatly appreciated - some may be too stringent for all systems. |
e0f10d0
to
9954479
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from the indentation issue, looks good to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this robustness improvement?
To align code style would prefer that you test input parameter first. i put an example in comment for the rpmsg_send_offchannel_raw
function
lib/remoteproc/remoteproc.c
Outdated
|
||
io = remoteproc_get_io_with_va(rproc, rsc_table); | ||
if (rproc && rsc_table) | ||
io = remoteproc_get_io_with_va(rproc, rsc_table); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about?
if (!rproc || !rsc_table || ! rsc_size)
return -RPROC_EINVAL;
io = remoteproc_get_io_with_va(rproc, rsc_table);
if (!io)
return -RPROC_EINVAL;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will change.
9954479
to
d7fe6c3
Compare
Added additional input parameter checks to APIs Signed-off-by: Tammy Leino <tammy_leino@mentor.com>
d7fe6c3
to
eb3f097
Compare
Added additional input parameter checks to APIs
Signed-off-by: Tammy Leino tammy_leino@mentor.com