[RFC PATCH 07/13] mux: mmio: Only complain about idle-states if it is malformed
Sean Anderson
seanga2 at gmail.com
Fri Feb 5 05:39:17 CET 2021
idle-states is optional, so don't complain if it doesn't exist.
Signed-off-by: Sean Anderson <seanga2 at gmail.com>
---
drivers/mux/mmio.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/mux/mmio.c b/drivers/mux/mmio.c
index 00e0282dcc..82b1cc6aab 100644
--- a/drivers/mux/mmio.c
+++ b/drivers/mux/mmio.c
@@ -87,8 +87,11 @@ static int mmio_mux_probe(struct udevice *dev)
ret = dev_read_u32_array(dev, "idle-states", idle_states, num_fields);
if (ret < 0) {
- log_err("idle-states");
devm_kfree(dev, idle_states);
+ /* dev_read_u32_array returns -EINVAL on missing property */
+ if (ret != -EINVAL)
+ return log_msg_ret("idle-states", -EINVAL);
+
idle_states = NULL;
}
--
2.29.2
More information about the U-Boot
mailing list