kernel: device: return NULL for pointer type

Return NULL instead of return numeric zero for pointer type.

Current usage violates MISRA rule 11.9.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2021-04-27 11:39:33 -07:00 committed by Anas Nashif
commit 0773441422

View file

@ -143,7 +143,7 @@ static inline const struct device *z_vrfy_device_get_binding(const char *name)
if (z_user_string_copy(name_copy, (char *)name, sizeof(name_copy))
!= 0) {
return 0;
return NULL;
}
return z_impl_device_get_binding(name_copy);