Signed-off-by: Lucas Stach <dev@xxxxxxxxxx> --- drivers/clk/clkdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index 66cd832..d9a1c21 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c @@ -179,9 +179,11 @@ struct clk *clk_get(struct device_d *dev, const char *con_id) if (!IS_ERR(clk)) return clk; - clk = of_clk_get_by_name(dev->device_node, con_id); - if (!IS_ERR(clk)) - return clk; + if (dev) { + clk = of_clk_get_by_name(dev->device_node, con_id); + if (!IS_ERR(clk)) + return clk; + } return clk_get_sys(dev_id, con_id); } -- 1.8.5.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox