mirror of
https://github.com/OpenAMP/open-amp.git
synced 2025-12-06 11:31:08 +08:00
The code contains redundant checks with both metal_assert(vdev) and if (!vdev). Moreover, if the assert is disabled, it may lead to dereferencing a null pointer. We should not rely on asserts for API validation. Instead, replace the assert with an error message. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>