Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1224889iog; Tue, 14 Jun 2022 01:38:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWTnrxiKbgZhKKOG9UDgOm4sDnrjimHeeF1AtTWstXMJuR9/4wEgSOcBCR1IASuSnbuXCa X-Received: by 2002:a17:907:9005:b0:718:391:45e with SMTP id ay5-20020a170907900500b007180391045emr3295180ejc.616.1655195917934; Tue, 14 Jun 2022 01:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655195917; cv=none; d=google.com; s=arc-20160816; b=TM5Q6DSptLs+AmZhV0trCOiUAP9p7oj29uaxNr0dJSXcOR+A2Ju63Ml7/URsxtFPNU N4vNiSxqOXmgpC4OYFaXAF+oFBIwAztMRsV4kFAt/svl6szB8qM6vfqJf6lgq1A4Sl2T 6+5kUd5vk3NBNlC6+JMeQ1jlIdmPRiKPKwz7+yeNGorNh+sJVWT6LJPswgvxDrOj+rx+ oTYqVlgk8PWRw1jvRFTynC06dfYLCCTQm1KN/9BFNX2I7HcAmNjnndsIKWZS0sw4a8LL +1Fe0SBBwkbBYpA1INh2W4cHNYzsIIykv7dtWyF4WyDlkZXtNX8gOjtEVi008o/5tA1t IaUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=dye9EtVvmXD7Xa5u3Kr8A9mvDtTV6pWN2cT3jTOH8i4=; b=yp200hdORVSuP0J/xcDnvOxjOONACZZzg9LSy3QYG1iqDeKt2kyB77qebU71e0Vd63 xIWSDzZ9AEwP7Owe/7wkP3L+WGCBOBIrbpFMsjJHu3C7vD6amN+Vt1ziY26qwcAzIIZl U2ejux2UDi14TJRejapfpu/YGWdAlbl39qYoB1hCgsUFTfWrusJoe1EWCrNklGjv5w1l +G22R7VfGRUYNjM8151Ui3F7B+bZeebEDk2qrPjAoCm2T82cdNGzzAwNAdIei1KpggCp +s0Y07stRlmTMytFE/VCUDJ1T6GAQ7Xsr6xEZRR3/DkEDdYrP0Fvukc2l311HKZfBz5/ 3xnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=UUod8iVf; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eo15-20020a056402530f00b0043187c8b46esi9925903edb.575.2022.06.14.01.38.12; Tue, 14 Jun 2022 01:38:37 -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=@collabora.com header.s=mail header.b=UUod8iVf; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352916AbiFNHxw (ORCPT + 99 others); Tue, 14 Jun 2022 03:53:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355539AbiFNHxV (ORCPT ); Tue, 14 Jun 2022 03:53:21 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C619640E76 for ; Tue, 14 Jun 2022 00:52:16 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id F2C4766016A5; Tue, 14 Jun 2022 08:52:13 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1655193134; bh=YiYxfz9UJYMv0Yzl92YcMKOgxfk4MMa4/uB2sRksOJM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=UUod8iVfxYNNRG93+40eRBJxUTQ3ZMgriSgsL2pjQ7TOiQCiDUa9nUiDsYxWRkP1I J5w3HAl/BXe/Q6B6GwMcl3f9CawLTS2jXqIIot2MCzgKx1VFkVC0GNtMAC6dwA2sDu sEDwNJugHElihkizTLODY+vFVbqAyo2Nc0A+SANM34T/+FBJEumOXIHLvqCqkGORER 1n53h10MPyNSaoBd/YmIETwznwOUFBZEAvHx3Flg9n9RcaFEA42l6jXeKo+8jwHlhJ md6WWZoS6XWPCD3fJHg9pceZe1BIdNxOqZ1IZUCGa5AbcJ7mX8a4xoOH/xSH5aIdN5 E7/yJ3pSnhAkQ== Message-ID: <9c8c712c-75d1-bd0f-0205-be769ce5e83d@collabora.com> Date: Tue, 14 Jun 2022 09:52:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] drm/bridge: anx7625: Zero error variable when panel bridge not present Content-Language: en-US To: =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Robert Foss Cc: 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 References: <20220613163705.1531721-1-nfraprado@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: <20220613163705.1531721-1-nfraprado@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 Il 13/06/22 18:37, NĂ­colas 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 stores > 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 that > 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_bridge") > Signed-off-by: NĂ­colas 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