Message ID | 20231103-uninit-fixes-v2-4-c22b2444f5f5@ideasonboard.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1023294vqu; Fri, 3 Nov 2023 06:16:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHngF5oFXc6eynpoMxRNrL8krfcHoBGNI9EjN4mk1vJ8d7ScR8puSiXRsSufCCYrppqilpU X-Received: by 2002:a05:6a21:7742:b0:181:3dde:deeb with SMTP id bc2-20020a056a21774200b001813ddedeebmr8973134pzc.33.1699017408599; Fri, 03 Nov 2023 06:16:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699017408; cv=none; d=google.com; s=arc-20160816; b=j4vr/kT1Ql7xh12rz9ZHtHUKx52tQTMsKTqg6D8n94w4DCDb0IgBvAGo6VzGs32qSs JGic+Ab8Qz4YdLIt5W7ohN2qqSdApMszdcwglIK+IEGBil/APEgTTnDZ1sH9e+tYw9gx tgcg3nRdcIxNQ6TdUX/nnKOD0KPEb2d41dnVxf3Svzz1DZ5Br/iBQ088N5f1aXteup+g MigxCLP4ozj9CMBnHQIO/6Wl6AF/TnBfXrS9tnAlT+GTtCNrRPmOIPngUmqKAI7X5uFU QG7KKp+BsjhPDNRKWJjKnnPkCxzBEMADu14TQif878j0BQQFkp+8sOyOcarDhbVRHIor BM9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=MZQ2cgPmJpqGaoPi7di1fjHvFGq+filW6kF8Eudrk/Y=; fh=dmgf1zKZhB/q4di8sVBSEfmJWDNrFAoGueAGci0ESTg=; b=eitRS0ROtMN90BlReXQJmPXwtbJ1l2NJ74es40HnxBqG/LtnAI+dICs7MBn1JrA2dF I73ga+utBKgwAa8MAvmG6hgHDtQictmXmzEwbg0dUaThzcc6XhJEDl2wxidJnqoOcBz+ 1AvkXfhwgBdUXH/23pq/DkgYxY7SJJbUvJ1y9LLv46oImMZONsN/FMVQ86Pg8L0A/WL5 LqkM6FPq0+J8KSnTWz3pt30nxTIviJadx+d4TJzqdzBzQl6PWJ9y/9rZgNY4lxUnWK1E uki0MFFVTIXV+qnlmzZcxfOleOL7+CaZVMN1Ean1HpnwB+Gsgft9YtqqQYNKM9rNUrmQ 7nOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=hCYpRxxV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id ka24-20020a056a00939800b006933e8fec67si1532747pfb.227.2023.11.03.06.16.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 06:16:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=hCYpRxxV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id BED758283A38; Fri, 3 Nov 2023 06:16:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377684AbjKCNPb (ORCPT <rfc822;lhua1029@gmail.com> + 36 others); Fri, 3 Nov 2023 09:15:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346906AbjKCNP2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 3 Nov 2023 09:15:28 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC5E610E5 for <linux-kernel@vger.kernel.org>; Fri, 3 Nov 2023 06:15:06 -0700 (PDT) Received: from [127.0.1.1] (91-158-149-209.elisa-laajakaista.fi [91.158.149.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A21001B3C; Fri, 3 Nov 2023 14:14:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699017248; bh=/YMvSFyCzcoztqCvEfSKeF9x2o+k/zCSCqmAdPdzVO4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=hCYpRxxV8PjHjoFcF+9rqbCN4DIlOabVHnkAPiROD0z9nLynmkbOGrruqtrAhPjv/ Z22umNd1TvTs/tpJakQQqru8FERq4FVTmL7Dixy26UIHvK0FNIome8u1QFRu+aDjcL xq3e/yUkh701BbcQrT4ZVDfq8HWkozWcrJdFbPew= From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Fri, 03 Nov 2023 15:14:06 +0200 Subject: [PATCH v2 4/4] drm/bridge: tc358767: Fix return value on error case MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231103-uninit-fixes-v2-4-c22b2444f5f5@ideasonboard.com> References: <20231103-uninit-fixes-v2-0-c22b2444f5f5@ideasonboard.com> In-Reply-To: <20231103-uninit-fixes-v2-0-c22b2444f5f5@ideasonboard.com> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Francesco Dolcini <francesco.dolcini@toradex.com>, Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <neil.armstrong@linaro.org>, Robert Foss <rfoss@kernel.org>, Jonas Karlman <jonas@kwiboo.se>, Jernej Skrabec <jernej.skrabec@gmail.com>, Parshuram Thombare <pthombar@cadence.com> Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=820; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=/YMvSFyCzcoztqCvEfSKeF9x2o+k/zCSCqmAdPdzVO4=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlRPIsY9zBPyFLRFuuV2diqQVeV3190D+UyXLZ6 fMQe8myRu2JAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZUTyLAAKCRD6PaqMvJYe 9beOEACkjxvj+96UcRM4CbLrb2joKUEkDxw0OQqhopsLE0298zI6t3N/YlL6ppKwaI1Eul01OTm oKxiwaLaJeq4VWtPnvbhifeRc8R+QsiIAiusWN3sSv4oaerK/58fscS1mnLuu38Gwr/3jv31fqS kk8vqGAVO2H7oNvCndE+tSq2JPBxkwdLeE9QF8/kCXw2DM7PnXb4xmYr4HhgH0vfDfUDQ+2Ct8Q Xjqg8mDkNKA5DcgYDWw0mpxMAH34z2P6qgEoW/fDTUGM5M4Dcbkp+LmDIEkNEZ/W0C+45wQ51hh nd2bvwUUSDatEQjw9Z6Z1VGanDGdfI8NzdGxd8iCCWyRPm6vIBKZhS59onpsjaLUrA4d43x94jO 4qxOybMkArBWa4IQfu6So6IFs5s8ksGR7w4nrLbllTwIBLSWyIyjvWmLdMCrTeBkYP54iNyhnLZ pTwTl96uR8cAh1Ip/ancXyqNP25L3BnUxJRgdjdpWqcv28Oi4pRFk0oYUihUlbCDEV/fv5L0XU3 PP0bgZF5V+b0cH07xOejOnGMMcHT0Vf/dmatMReuyNliIKrZeBD60ZrYIEHQCPRJv4WjVvhH94P qr+nARHVKkQtc3hCraX0RjnuS6WLjY/affhn9X5hu57k7zqGjxgscc+XJFnZgoyazJ7ZBkvrIdm DEwdDpXKnSEj7Mg== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 03 Nov 2023 06:16:21 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781548878174105305 X-GMAIL-MSGID: 1781548878174105305 |
Series |
drm: Fix errors about uninitialized/wrong variables
|
|
Commit Message
Tomi Valkeinen
Nov. 3, 2023, 1:14 p.m. UTC
If the hpd_pin is invalid, the driver returns 'ret'. But 'ret' contains
0, instead of an error value.
Return -EINVAL instead.
Fixes: f25ee5017e4f ("drm/bridge: tc358767: add IRQ and HPD support")
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
drivers/gpu/drm/bridge/tc358767.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index ef2e373606ba..615cc8f950d7 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -2273,7 +2273,7 @@ static int tc_probe(struct i2c_client *client) } else { if (tc->hpd_pin < 0 || tc->hpd_pin > 1) { dev_err(dev, "failed to parse HPD number\n"); - return ret; + return -EINVAL; } }