From patchwork Sun Jun 12 13:21:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 12878707 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0A000C433EF for ; Sun, 12 Jun 2022 13:22:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5438B10E32E; Sun, 12 Jun 2022 13:22:18 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by gabe.freedesktop.org (Postfix) with ESMTPS id ABBCF10E36C for ; Sun, 12 Jun 2022 13:22:14 +0000 (UTC) Received: from tr.lan (ip-86-49-12-201.net.upcbroadband.cz [86.49.12.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id B74C68441A; Sun, 12 Jun 2022 15:22:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1655040133; bh=/uMkAREEyFL5fNhBsokObfv/Ik4lTHRXziN6JFpJnVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I2/2BEv/kFbSAeOZ8yqAZc12TudI99cdGifFBvWMdiAECF7EE0liwjy87i2nQd9Eo gQfTVY+8KQNOH+0ZV5w488kerk46O2m4G1by8Bnj/ZyhgQciFpPdjPsdvf6IlUkFXD m5/1wbMYyjR1SnZZ0jvAMiDceVLJMp3yN/Y4dvSkWhLi/Y2YRJ1uxA9e8AUYeKcC8p gAsNOaF/BRCLkAWgqiTNdsf41p6SFBfq08pPFC4gWb7iLJ5nEkLciO6E2IIw/eFkBz l8YUUQLkq42XSf69lZ/hx8mWuRqPo8DKXbom8orbOiHpShgj/2OAc4rrE5dMDlhQsv /ziPd89KJYD+A== From: Marek Vasut To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/3] drm/bridge: tc358775: Fix drm_of_get_data_lanes_count_ep conversion Date: Sun, 12 Jun 2022 15:21:51 +0200 Message-Id: <20220612132152.91052-2-marex@denx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220612132152.91052-1-marex@denx.de> References: <20220612132152.91052-1-marex@denx.de> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , kernel test robot , Maxime Ripard , robert.foss@linaro.org, Laurent Pinchart , Andrzej Hajda , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Initialize dsi_lanes to -1, so that in case the endpoint is missing, probe would fail as it did before the conversion, instead of depending on uninitialized variable and thus undefined behavior. Fixes: 56426faa1492 ("drm/bridge: tc358775: Convert to drm_of_get_data_lanes_count_ep") Reported-by: kernel test robot Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Acked-by: Sam Ravnborg --- drivers/gpu/drm/bridge/tc358775.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c index 5b1fb8e2f9a7d..e5d00a6e7880b 100644 --- a/drivers/gpu/drm/bridge/tc358775.c +++ b/drivers/gpu/drm/bridge/tc358775.c @@ -529,7 +529,7 @@ static int tc358775_parse_dt(struct device_node *np, struct tc_data *tc) struct device_node *endpoint; struct device_node *parent; struct device_node *remote; - int dsi_lanes; + int dsi_lanes = -1; /* * To get the data-lanes of dsi, we need to access the dsi0_out of port1