Files
zephyr/kernel
Armando Visconti 4b4068c948 kernel/device: add arg checking in z_device_ready()
If this call receives an invalid device pointer as argument it
assumes that the `device` is not ready for usage.

This routine is currently called by two device specific APIs:

    - device_usable_check(const struct device *dev)
    - device_is_ready(const struct device *dev)

The device-specific APIs documentation claims that these two
routines must be called with a device pointer captured from
DEVICE_DT_GET(). So passing NULL is a violation of the rule.

Nevertheless, is quite common in drivers to assign NULL to
a device pointer if the corresponding DT property has not been
found (e.g. a not used gpio interrupt declaration for a given
device instance) and seems legit to interpret this condition
same as the device is not ready for usage.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-05-18 11:29:46 -05:00
..
2020-11-27 20:08:14 -05:00
2021-04-10 09:59:37 -04:00
2021-05-17 18:45:57 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-05-07 22:10:21 -04:00
2021-01-15 14:51:20 +01:00