lx_emul: correct the return value of clk_get

Fix genodelabs/genode#4937
This commit is contained in:
Stefan Kalkowski 2023-06-28 14:55:39 +02:00 committed by Norman Feske
parent 7563cf5c55
commit 720d2847b6

View File

@ -17,10 +17,13 @@
struct clk *clk_get(struct device *dev, const char *con_id)
{
struct clk * ret;
if (!dev || !dev->of_node)
return NULL;
return lx_emul_clock_get(dev->of_node, con_id);
ret = lx_emul_clock_get(dev->of_node, con_id);
return ret ? ret : ERR_PTR(-ENOENT);
}