Commit c6d82697 authored by Matthias Brugger's avatar Matthias Brugger Committed by Mauro Carvalho Chehab

media: mtk-mdp: Check return value of of_clk_get

Check the return value of of_clk_get and print an error
message if not EPROBE_DEFER.
Signed-off-by: default avatarMatthias Brugger <mbrugger@suse.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent a5e72cfa
......@@ -110,6 +110,12 @@ int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
for (i = 0; i < ARRAY_SIZE(comp->clk); i++) {
comp->clk[i] = of_clk_get(node, i);
if (IS_ERR(comp->clk[i])) {
if (PTR_ERR(comp->clk[i]) != -EPROBE_DEFER)
dev_err(dev, "Failed to get clock\n");
return PTR_ERR(comp->clk[i]);
}
/* Only RDMA needs two clocks */
if (comp->type != MTK_MDP_RDMA)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment