Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp661130iog; Wed, 15 Jun 2022 09:34:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tlK1quDky/HgON7NSs+jffXKpc5vfJ1Y4JAn0/3VUm5G//EcPrEub9ljjuo/JRmdpnB7dW X-Received: by 2002:a17:90a:740e:b0:1e2:a631:87e6 with SMTP id a14-20020a17090a740e00b001e2a63187e6mr284692pjg.115.1655310889645; Wed, 15 Jun 2022 09:34:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655310889; cv=none; d=google.com; s=arc-20160816; b=eWxB++U36lMKZtg1yHzyjWSai9tp4ClNdvBAXS5ESEEKahyp0KPMsX+iSOBl3wpWaI 42Rlg0FT4H/yPmop5zNJFKf8ZLXkAsvtplyVrSESYpZUix6CJZA/HbLFklD1MZsyn0rd li7/Uqt6Ppsd18aClbjtw2v392DRHUfvp9hMbTU9EYXKLhbLXiMc8NtPG/D6mHA4j28x JoejKtbfsK6tK8k+x1ABCV91wZYPNhXPQ23FK8nmXq4QOh233MCcwv7x63UMyQ0dHB37 3DW2MgERaSfJpxMsqSQQp/houmBGBB1xEZuIZ4QqAUmZbBYAg5GX4tYlqvqgJegGQR+3 pPjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ePN6l7qq+5+AEApPN8ZIDny0v2CL19RcX8ZdNrMR7lM=; b=a6jAvXJ5GLJZK3co5Bn56dsyn8Aens31nnIL5jlnyWupBY/KrbrLFsZ61wsCAdS+fX 8atPyZL8vcsCouHYk4PMnnpCL9a0v5VJ9OTb5W17INPds7+89O9aOZZJY3HMmJJKELT+ 7svh5yfz1f1pwLPtB1HN1Ta1eKyKtj2yJ6D+UpzKlSew2EYtWciiBo1FxNo9Ne/ioEZc M5BQ2GF8KFN7m0wPzv0oWyAfATgB8Cl1nxCxcmRZRXKT3DALOuSG3Y1V8TpTUWzHU6qd e+BsrmquSWrgxhedcF2I8ng/VeyafB6qYJUy675poOKX82q8Sl+RYxU+L2xgEx/5hupe /33g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aqM0+dFn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j6-20020a17090a7e8600b001e336c884c7si2664442pjl.182.2022.06.15.09.34.35; Wed, 15 Jun 2022 09:34:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aqM0+dFn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241735AbiFOQEy (ORCPT + 99 others); Wed, 15 Jun 2022 12:04:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232197AbiFOQEx (ORCPT ); Wed, 15 Jun 2022 12:04:53 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ACD2255BE for ; Wed, 15 Jun 2022 09:04:51 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id o33-20020a17090a0a2400b001ea806e48c6so2476629pjo.1 for ; Wed, 15 Jun 2022 09:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ePN6l7qq+5+AEApPN8ZIDny0v2CL19RcX8ZdNrMR7lM=; b=aqM0+dFn+nn8gN9lgLMZUiyexrJiMRh9URiP1j+pSR5rH9FkZgHYRqWHAGfoOH7H/o apqcb2Dt7BbllawEZXVjxmkejglQNMu8/m/ujk9rvIJO/2nl+oTm2L5DVPcLrN1HKfOj bHAGlIQLWJssv8v2uPJdpwtXpYuCnhLLi1buEkKltNqWnc3wbTTrjB2zJhfAL11UH+CV qbsmGDz4A0Ueag0lhEd2Dr+4z4HJ1BHWv8YWg2vD3pOsABM1ZdIkjDWkeoWUFl9QVlI7 6S6DAA+GJZm+8R4kiejkyXWgiRXnUGU4gp6fZAMJYI3csPLiA3mgAwppGQ44fA8W5EXb O62w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ePN6l7qq+5+AEApPN8ZIDny0v2CL19RcX8ZdNrMR7lM=; b=SfbheBBzXbMyhEpmiVS8qMecX5CsiVjp6uBQ7BCsYYCQ9A+yxAN0ZCvFrgEoSysnpb swGMy81a5ZeydHd6OcEJUX9VuyJRAh6FNAwTWSbcDYaM0IyXk6IXd8ZNcWdfYD6DBPUh hVr9Q1aQ2eswruABXJmrxMFFn6Wu8atopobPcUPNeMHY5EmTCjEGMMuFlaPe35rCEljq hnVe0KI5DqzFJlD+BqmrnBqUhgZ2V0uhE7FVLpAXt3LzcSIo2oXctl0hrX+FsSc/ineC mx318KOR0DmGCsvWNT/Hq3ixMnxCKsYR38+y6FsDre19eh9sr0YGzGcmA5JM1K/ps4pL e2oA== X-Gm-Message-State: AJIora9JQB1Osy7kFXRZY4PM0apjRim7WwMeVizVJKaH+XuEMGfTXrrh PBHIbqOCmsled7YqUMTSlhDNroUhUlNXwwRHo2Rf3A== X-Received: by 2002:a17:902:f353:b0:167:7bc1:b1b9 with SMTP id q19-20020a170902f35300b001677bc1b1b9mr84680ple.117.1655309090641; Wed, 15 Jun 2022 09:04:50 -0700 (PDT) MIME-Version: 1.0 References: <20220613163705.1531721-1-nfraprado@collabora.com> <9c8c712c-75d1-bd0f-0205-be769ce5e83d@collabora.com> In-Reply-To: <9c8c712c-75d1-bd0f-0205-be769ce5e83d@collabora.com> From: Robert Foss Date: Wed, 15 Jun 2022 18:04:39 +0200 Message-ID: Subject: Re: [PATCH] drm/bridge: anx7625: Zero error variable when panel bridge not present To: AngeloGioacchino Del Regno Cc: =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , kernel@collabora.com, Andrzej Hajda , Daniel Vetter , David Airlie , Hsin-Yi Wang , Jernej Skrabec , Jonas Karlman , =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= , Laurent Pinchart , Maxime Ripard , Neil Armstrong , Sam Ravnborg , Thomas Zimmermann , Tzung-Bi Shih , Xin Ji , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Jun 2022 at 09:52, AngeloGioacchino Del Regno wrote: > > Il 13/06/22 18:37, N=C3=ADcolas F. R. A. Prado ha scritto: > > While parsing the DT, the anx7625 driver checks for the presence of a > > panel bridge on endpoint 1. If it is missing, pdata->panel_bridge store= s > > the error pointer and the function returns successfully without first > > cleaning that variable. This is an issue since other functions later > > check for the presence of a panel bridge by testing the trueness of tha= t > > variable. > > > > In order to ensure proper behavior, zero out pdata->panel_bridge before > > returning when no panel bridge is found. > > > > Fixes: 9e82ea0fb1df ("drm/bridge: anx7625: switch to devm_drm_of_get_br= idge") > > Signed-off-by: N=C3=ADcolas F. R. A. Prado > > > > I would've preferred s/zero out/cleanup/g but it's also fine as you wrote= it. > Besides, good catch! > > Reviewed-by: AngeloGioacchino Del Regno > Applied to drm-misc-next