Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2685838ybv; Mon, 24 Feb 2020 09:38:07 -0800 (PST) X-Google-Smtp-Source: APXvYqw0SGKPumvyj3ka06XC97yDotP7fGbOL+O55uv15G5RyEspT/+mOqg8WyZxBFQjBKi3SURW X-Received: by 2002:a9d:638a:: with SMTP id w10mr29039062otk.130.1582565887243; Mon, 24 Feb 2020 09:38:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582565887; cv=none; d=google.com; s=arc-20160816; b=fKRxA4YtgEzh6Qyg39OZJ5gWy9P0KrjmsINSjDqYf+diOgRTXDUPAaDCL24sZOXC6v fvXtTkOQq90RLZ3SNbG2RZqPuPKlM+h5D186UAM3xaJuqQQ0PbI9xOKtc98OkHWUrGnh JHDbft/qOsy6KFk4NmzFfNoxbjh28R8PhMHp85EiOYS48HTX0bMjQi3Tyxmuzsqt/mh+ dQeeIPvTuZxBp8zJ/wAniAWFaDYIl3mznxL8sGXCAK6/mOQFkbO6I2LNuWHXtpEzUkgD qJqajpAlPLU8dITZ6Nk5+/8KwhA6Kv0TWgjHAhlS/uQ8Fnwd5IzWzyvnvaunkamD9Yd8 BN3w== 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:dkim-signature; bh=+Ut1mFONrMyDQY1g0dvIqwQmUQyccv/MhZXUMWlHI9A=; b=uvhBmHyQC8oShs/VPOJnkIDAiiqahBb4N+kM/sZBLS0Qd3wHQegSMS0SCvAxvX28cJ X0Ck+4Cfqx8dTWt+6HQQFZP7O/ge/TkmAbBqj+a9ydhdgRGwMSWGg+0+/5AfQfMzZkJz v6/E8RqurItrsbx4eHwiNuGOGphWlVZWRaX+qQgKJX7W0XG7AmXAvKfI24DJ2NUukyYR nDk9EaK7yPl2aZsh5xuhzZ6VcKzURkTWwbBz3Q80uPWFu2i1bnv5E1rBQOEVUiLrAhKl usBrorCTUbZl1N9xHE/sMRj2os82K5qpBFFnKYSO1sjKdnhjRxJxt6QDEJFQgqVL/eo6 pSpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s1 header.b=AjPklyf5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g15si6050072otk.85.2020.02.24.09.37.54; Mon, 24 Feb 2020 09:38: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; dkim=pass header.i=@xs4all.nl header.s=s1 header.b=AjPklyf5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728031AbgBXRgs (ORCPT + 99 others); Mon, 24 Feb 2020 12:36:48 -0500 Received: from lb2-smtp-cloud9.xs4all.net ([194.109.24.26]:43187 "EHLO lb2-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727259AbgBXRgr (ORCPT ); Mon, 24 Feb 2020 12:36:47 -0500 Received: from [192.168.2.10] ([46.9.234.233]) by smtp-cloud9.xs4all.net with ESMTPA id 6HeejhXRRyIme6Heij4c5R; Mon, 24 Feb 2020 18:36:45 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s1; t=1582565805; bh=+Ut1mFONrMyDQY1g0dvIqwQmUQyccv/MhZXUMWlHI9A=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=AjPklyf5BwQcNHOgIqII5CgvXvmQ1u4PiNNlUpLpKq2LWeWDdeNN1l4VivqIlBI4D K6KO4mKvo4UCrOFYB1ok9plTr5KSKjPk7ZHmg9c/rKZKRTu9dPY6B5NGcwNw+beimV pWgzdX/kjeC7+sTVYaHMQpyZ1LwJ3d5VE8PDabba4fxWUbByaPEPGVgNLRDdnQ+r+p EwpKgoaSu0/oM7DOXfyB1xSsDRfLCAnOeGx6VoYnLE9HKj8e9rXilQJANYkEnkvm72 6oSXCjkwZogH4rbFriWzzRqQTTANFEu40AcVxFFq2cjGeZ+KXGaFM8vT5WNRmfRA5C DGx8nXNjzAjog== Subject: Re: [PATCH v7 06/13] 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, enric.balletbo@collabora.com Cc: devicetree@vger.kernel.org, drinkcat@chromium.org, frank-w@public-files.de, sean.wang@mediatek.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, wens@csie.org, linux-mediatek@lists.infradead.org, rdunlap@infradead.org, hsinyi@chromium.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, Matthias Brugger , Andrew-CT Chen , Houlong Wei , Matthias Brugger , Mauro Carvalho Chehab , Minghsiu Tsai References: <20200213201953.15268-1-matthias.bgg@kernel.org> <20200213201953.15268-7-matthias.bgg@kernel.org> From: Hans Verkuil Message-ID: <9d39ba53-482e-ba8f-2699-c34540a3dfd0@xs4all.nl> Date: Mon, 24 Feb 2020 18:36:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200213201953.15268-7-matthias.bgg@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 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gcB486IsA5xwHjdMfE6it +/AEsmalRYePA+Xv27YRGaBkwwcasHLXraWguBJ3YT7FzyE2b4EocUkP+RQ2C+0C0GwBZEs5SdYGudBxmAHZ+n0jARTz4B9QdHuZf+CKyE2QRRsJ3kkQBSY7 CiymZeJ+kXPXXU2qZugulQEx6TB7dY6owNLKOzmCmFs= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matthias, On 2/13/20 9:19 PM, 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 This patch is independent from the remainder of this series, right? It looks good to me, so is it OK if I merge this in the media subsystem? Regards, Hans > > --- > > 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) >