kernel: Using boolean expression on ASSERT macros
ASSERT macro expects a boolean expression, making it explicit. MISRA-C rule 14.4 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
6fdc56d286
commit
d8837c6888
7 changed files with 18 additions and 16 deletions
|
@ -83,7 +83,7 @@ static inline int clock_control_get_rate(struct device *dev,
|
|||
{
|
||||
const struct clock_control_driver_api *api = dev->driver_api;
|
||||
|
||||
__ASSERT(api->get_rate, "%s not implemented for device %s",
|
||||
__ASSERT(api->get_rate != NULL, "%s not implemented for device %s",
|
||||
__func__, dev->config->name);
|
||||
|
||||
return api->get_rate(dev, sys, rate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue