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:
parent
abfe045fd3
commit
0773441422
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue