From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sean Anderson Date: Thu, 4 Feb 2021 23:39:17 -0500 Subject: [RFC PATCH 07/13] mux: mmio: Only complain about idle-states if it is malformed In-Reply-To: <20210205043924.149504-1-seanga2@gmail.com> References: <20210205043924.149504-1-seanga2@gmail.com> Message-ID: <20210205043924.149504-8-seanga2@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de idle-states is optional, so don't complain if it doesn't exist. Signed-off-by: Sean Anderson --- 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