Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3896293ybl; Mon, 9 Dec 2019 01:52:07 -0800 (PST) X-Google-Smtp-Source: APXvYqxfUIlh37XxN+vAxyeq27JfG7DSd7bvAMxOSPrFdSJwtP+DM39+W7tWb6Z7jXLPoTpis2NM X-Received: by 2002:a05:6808:ab1:: with SMTP id r17mr22080427oij.141.1575885127463; Mon, 09 Dec 2019 01:52:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575885127; cv=none; d=google.com; s=arc-20160816; b=r9s7UgCNFlqKKj+lLjLqaS8mmbvZYF4xcfhMrhTthuqiSpKUXKWoBc+d7Cvai7LOkE n+UjU/QHH3JBe0OkXRecqZlFDtZm7i/0bcyYMA/diH0L/pfy0of80cLBbaPeaJSA1XOo oa3x8t3cRY7rYMO/TCyIHvFT85wa/LBEhlxX9Uo+Pv2fcQADLEhk4UfKH5sYrV4yRSNd H7gRnT+KsUcrUlq0pO7JHW9eDbILNx5Fr+3JhJwLPlNXFcEUTHUc/om6y1RDvRfDIZf4 JvMioWb7LoW5kl8DmRp/9wcE4vsaY9EdxUZubVe9wulJknBgB0FOmq9JXy9GPt7yR+wG 1J1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=jaBO2/t533wmfmUqhvmS9FaEZn4ErIt3Zu60r5BxKTU=; b=yR4OKHhIxQ2PawHmvwnPbw1gXkv/w9M3HyNWHJPWIS/Xbj27+xW+z3gitqXtnnL5uk 12dDd0U5FaHYRqNprUrGlfF4pbU/mZFcClIDct6h2qdT4VXlORaLbTRBQsClxr311QCR 4gYGTa1ApDDaUWc9ZUKPDISB7kUlEeFyJoJITBYFxAKq5TtEHB9pTJHYMP0SUA7qZPpE tTL8Yo87/iH2qwzmnhWidtbeK1d3GMsa7mpkjNi4lo02wKZrVbs3ZvuZrUJIbwSihN59 anMqxhTMVN32y3lUMMfbwTvjl1FHJTLJel3fq5FPBzIBQVUkVpO6ai3KRhIHFoSh6kvt SneQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j24si11959551oie.176.2019.12.09.01.51.54; Mon, 09 Dec 2019 01:52:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727337AbfLIJuJ (ORCPT + 99 others); Mon, 9 Dec 2019 04:50:09 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:40512 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725994AbfLIJuI (ORCPT ); Mon, 9 Dec 2019 04:50:08 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id D519528BA69 Subject: Re: [resend PATCH v6 05/12] media: mtk-mdp: Check return value of of_clk_get To: matthias.bgg@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, ck.hu@mediatek.com, p.zabel@pengutronix.de, airlied@linux.ie, mturquette@baylibre.com, sboyd@kernel.org, ulrich.hecht+renesas@gmail.com, laurent.pinchart@ideasonboard.com Cc: sean.wang@mediatek.com, sean.wang@kernel.org, rdunlap@infradead.org, wens@csie.org, hsinyi@chromium.org, frank-w@public-files.de, drinkcat@chromium.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, mbrugger@suse.com References: <20191207224740.24536-1-matthias.bgg@kernel.org> <20191207224740.24536-6-matthias.bgg@kernel.org> From: Enric Balletbo i Serra Message-ID: <8d0b7ac3-abb5-2a05-32a6-648830632a74@collabora.com> Date: Mon, 9 Dec 2019 10:50:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191207224740.24536-6-matthias.bgg@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matthias, On 7/12/19 23:47, matthias.bgg@kernel.org wrote: > From: Matthias Brugger > > Check the return value of of_clk_get and print an error > message if not EPROBE_DEFER. > > Signed-off-by: Matthias Brugger > --- > 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 9afe8161a8c0..4e2fc1337b80 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])i) { Oops ^ > + if (PTR_ERR(comp->clk[i] != -EPROBE_DEFER) and missing closing ) > + dev_err(dev, "Failed to get clock\n"); Like the previous patch I think that the clk core will print a message if the clock is not found and you can just this redundand dev_err. > + > + return PTR_ERR(comp->clk[i]); > + } > > /* Only RDMA needs two clocks */ > if (comp->type != MTK_MDP_RDMA) >