[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200213201953.15268-7-matthias.bgg@kernel.org>
Date: Thu, 13 Feb 2020 21:19:46 +0100
From: matthias.bgg@...nel.org
To: robh+dt@...nel.org, mark.rutland@....com, ck.hu@...iatek.com,
p.zabel@...gutronix.de, airlied@...ux.ie, mturquette@...libre.com,
sboyd@...nel.org, ulrich.hecht+renesas@...il.com,
laurent.pinchart@...asonboard.com, enric.balletbo@...labora.com
Cc: devicetree@...r.kernel.org, drinkcat@...omium.org,
frank-w@...lic-files.de, sean.wang@...iatek.com,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
wens@...e.org, linux-mediatek@...ts.infradead.org,
rdunlap@...radead.org, matthias.bgg@...nel.org,
hsinyi@...omium.org, linux-clk@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-media@...r.kernel.org,
Matthias Brugger <mbrugger@...e.com>,
Andrew-CT Chen <andrew-ct.chen@...iatek.com>,
Houlong Wei <houlong.wei@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Minghsiu Tsai <minghsiu.tsai@...iatek.com>
Subject: [PATCH v7 06/13] media: mtk-mdp: Check return value of of_clk_get
From: Matthias Brugger <mbrugger@...e.com>
Check the return value of of_clk_get and print an error
message if not EPROBE_DEFER.
Signed-off-by: Matthias Brugger <mbrugger@...e.com>
---
Changes in v7:
- fix check of return value of of_clk_get
- fix identation
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
drivers/media/platform/mtk-mdp/mtk_mdp_comp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
index 0c4788af78dd..58abfbdfb82d 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)
--
2.24.1
Powered by blists - more mailing lists