aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Brugger <mbrugger@suse.com>2020-02-13 21:19:46 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-03-12 12:48:29 +0100
commit7b03d504269160d7fe68724b970a74b658c150fa (patch)
tree176caf872ef6eeb984e7a8878be8e6721e3fa886
parent852cf75413396674607fdae2d0b3c0c940413500 (diff)
media: mtk-mdp: Check return value of of_clk_getbr-v5.7i
Check the return value of of_clk_get and print an error message if not EPROBE_DEFER. Signed-off-by: Matthias Brugger <mbrugger@suse.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--drivers/media/platform/mtk-mdp/mtk_mdp_comp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
index 9afe8161a8c0..14991685adb7 100644
--- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
+++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
@@ -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)

Privacy Policy