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

imx/gpt.c allocate_register_callback asserts instead of returning an error #50

Open
bennoleslie opened this issue Sep 27, 2020 · 0 comments

Comments

@bennoleslie
Copy link

In the allocate_register_callback function there is an assert:

    assert(curr_num == 0);

This does not seem appropriate. I'd suggest that this should return an error (in the same way that if ps_pmem_map fails an error is returned). The function has no reasonable basis on which to assert curr_num as the FDT contents are well outside the control. (By contrast the assertion assert(token != NULL) seems reasonable as this is controlled by the call to ps_fdt_walk_registers which is in the same module).

I'm not sure what the most appropriate return value would be, or what if this affects other areas as well.

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

No branches or pull requests

1 participant