[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200220172147.919996-4-enric.balletbo@collabora.com>
Date: Thu, 20 Feb 2020 18:21:44 +0100
From: Enric Balletbo i Serra <enric.balletbo@...labora.com>
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
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>, rdunlap@...radead.org,
dri-devel@...ts.freedesktop.org, Weiyi Lu <weiyi.lu@...iatek.com>,
Seiya Wang <seiya.wang@...iatek.com>,
linux-clk@...r.kernel.org,
Collabora Kernel ML <kernel@...labora.com>,
mtk01761 <wendell.lin@...iatek.com>,
Allison Randal <allison@...utok.net>,
Thomas Gleixner <tglx@...utronix.de>, wens@...e.org,
Kate Stewart <kstewart@...uxfoundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Houlong Wei <houlong.wei@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
linux-media@...r.kernel.org, devicetree@...r.kernel.org,
sean.wang@...iatek.com, frank-w@...lic-files.de,
Minghsiu Tsai <minghsiu.tsai@...iatek.com>,
Andrew-CT Chen <andrew-ct.chen@...iatek.com>,
linux-mediatek@...ts.infradead.org, hsinyi@...omium.org,
Matthias Brugger <mbrugger@...e.com>,
linux-arm-kernel@...ts.infradead.org,
Richard Fontana <rfontana@...hat.com>,
linux-kernel@...r.kernel.org, matthias.bgg@...nel.org,
Daniel Vetter <daniel@...ll.ch>
Subject: [PATCH v8 3/6] 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>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
---
Changes in v8: None
Changes in v7:
- Fix check of return value of of_clk_get
- Fix identation
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.25.0
Powered by blists - more mailing lists