From patchwork Fri Nov 3 13:14:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 13444535 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 5C1DEC001B0 for ; Fri, 3 Nov 2023 13:14:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4A6CD10E9D3; Fri, 3 Nov 2023 13:14:30 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id D813E10E9E1 for ; Fri, 3 Nov 2023 13:14:24 +0000 (UTC) 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 812957E1; Fri, 3 Nov 2023 14:14:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699017245; bh=xvh2d5U42urNPpTVLrPHqnnQohefIEzDhgWLBqn84R4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=md8XVaGNJcNAoIJSUkmjHsee+W5rT7WUnAu/frOfntimOdTILaaPQJLnrC+s4+1iX kQYyAboeJy5Wk4wiUd5nl7G237ntAiVNmn1XLgZSon5GZBUrwsFua+x1UJ4ky6e4n+ Jx9bS6+pHMqQg6R/Ped6LrG30BGpEZQKaX4RB0ys= From: Tomi Valkeinen Date: Fri, 03 Nov 2023 15:14:03 +0200 Subject: [PATCH v2 1/4] drm/drm_file: fix use of uninitialized variable MIME-Version: 1.0 Message-Id: <20231103-uninit-fixes-v2-1-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 , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Laurent Pinchart , Francesco Dolcini , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , Parshuram Thombare X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1148; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=xvh2d5U42urNPpTVLrPHqnnQohefIEzDhgWLBqn84R4=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlRPIrnmZo1zjRKv5d2MoQWEqetAoew50nTwIqf 4dYQyqbaIqJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZUTyKwAKCRD6PaqMvJYe 9deJEACAmhSvKQOpGftUEQRGJaU5QM4IipaLrzmOLtkoZklkMeFjdjFJL7fbrnKSeoOJkQL7kBA H3Y5ejdcQmxVlVhQ/DGg9LVBCDf+9mFIeX6WhItd6mUD7fCiqj0hjlRl8uiYxjEqLiz/mVwJW5e tBmZr0EMycBkMWL2Iczj4c2HVgyUEb3qo48WgOMOWy6w5+Ko0JLgOCo7SZieFzIJ3mtc4uGGCNK ouKC0bUqInXKHzq1PJWOGQ6TZ84OUO4oLXTwoMzE5LBtTNifsly1AI8ozSKeFEz1tVB+X/AiG7V 7UZ0Oz4hWPreJolS6miy96S+sJMuVtsHCb5tr5fieU1aHbnkZ56JK90nHoAbZ0d1N6Blvc3CsQE DmCW13ptjh868qfqsDoC8F2KQDPH7RqRTV7nLJD4lDmirRs2B0TTC3zd35sbs3ucsumS2Oavxr6 FDogtoqiLKYDgLsvk7ARbrpk+krN7N+hTKCnktHyWGQS90I9R+nvCZh+pj4S71aXc2+jWQiU3QH PHvdQcf8km2KSi9YPz2qtjFfHdMtCZe1Wb5TmESVPxBTg8BDIwKD+CXkNNZeOwILtQWI64I507H Eb6d3WQz11814zPUipjoO6D2vuyAuWb66JROZGUHO3gTm8ZmukiZBYrd8Ztfcqjh60CqjM98BcW 0oogiXp2RxzZEpw== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 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: Tomi Valkeinen , Laurent Pinchart , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" smatch reports: drivers/gpu/drm/drm_file.c:967 drm_show_memory_stats() error: uninitialized symbol 'supported_status'. 'supported_status' is only set in one code path. I'm not familiar with the code to say if that path will always be ran in real life, but whether that is the case or not, I think it is good to initialize 'supported_status' to 0 to silence the warning (and possibly fix a bug). Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/drm_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index 446458aca8e9..54a7103c1c0f 100644 --- a/drivers/gpu/drm/drm_file.c +++ b/drivers/gpu/drm/drm_file.c @@ -958,7 +958,7 @@ void drm_show_memory_stats(struct drm_printer *p, struct drm_file *file) { struct drm_gem_object *obj; struct drm_memory_stats status = {}; - enum drm_gem_object_status supported_status; + enum drm_gem_object_status supported_status = 0; int id; spin_lock(&file->table_lock); From patchwork Fri Nov 3 13:14:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 13444532 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 A0438C4167B for ; Fri, 3 Nov 2023 13:14:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D2EED10E9E3; Fri, 3 Nov 2023 13:14:27 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7E97710E9ED for ; Fri, 3 Nov 2023 13:14:25 +0000 (UTC) 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 91371BEB; Fri, 3 Nov 2023 14:14:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699017246; bh=zdGGDGGi0EjJoJXJD3OePDCfsWtgBRwsx7Z+r8jYoyA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Ykodq0rZICsxpK3As05OwmeuKKRSc7UhBzxtHtAgoOm44Sb6TfveAeBC3p2QmW4yG ItylLtyNGJK61KVKVXmLi80H+AjsLe4rAq4ffGIZE2uoJ442HwpM0uymsOZD6PaYY0 VKv/syGSd1uRc4UvJjkQHh6CpVp5BFGGjBQfeTM8= From: Tomi Valkeinen Date: Fri, 03 Nov 2023 15:14:04 +0200 Subject: [PATCH v2 2/4] drm/framebuffer: Fix use of uninitialized variable MIME-Version: 1.0 Message-Id: <20231103-uninit-fixes-v2-2-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 , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Laurent Pinchart , Francesco Dolcini , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , Parshuram Thombare X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1032; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=zdGGDGGi0EjJoJXJD3OePDCfsWtgBRwsx7Z+r8jYoyA=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlRPIsWu+CRgRS5bZtVv9evyDD5YSsgvRh8ehjM qDeOXjyVkeJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZUTyLAAKCRD6PaqMvJYe 9XSiD/4qJVFOddephYbYFQsGjgjnyGoamkQnluXuBX09mIL4+G8dJth68eLvlTFnCaPAO9QwR5l 3TWv+SMFR5DDmlGn0tR3VrggNqPe2riOWGT2TAlpGtluD6a9Hj0hRmx+b8tL2WVXCjsGVFDB4Cn 8oQ9RcCVyiv50KWeBAF4gUoVYndSusuHH87eJjmvA4EXqU/m5kyqJLe+jeO+x3MrH8hC+kcLFmZ 9mUI069yxsthJFSZJjU9oSur684yA7FUdqCXBwyl1JcVLd3+LZcZyiVcmcp0amIOuTsvFZxPx7j KIeU44AQnLhtCADOFl02OKktxXEHi6B0q9Y82VGxZ7OlUvD+gTZnlLAoP2U5n7Ix0V5w7+FtdVR od6r1qIuVLDxvfNHEU+hGpJ0vdNpoFWCwphMVC4zp/O1pIxnzSDxIItIzKgh5mEkpFN+WXT3bwZ veocAeyq7iuxKpwdHXtqlEQVX/+ZWrUZOqsScRNjcVVG30ePi9ZRzZm8KSlJw2biyxXsMhcbRTC 9cIb6yrNVZfdYA0LbagOhq0xEejlJANNHVYxxrtyIU56N/yUCpzPwgl5R2h5hN+mFEpNMBto2IO dAgSjJBil93r3dnhCdE9s1ssyRYszqFnhgeRmj+o7gLeI+8UoBXeDh6onU+dh513wUEjGjcmR8z y4TZMtPPefBl00g== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 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: Tomi Valkeinen , Laurent Pinchart , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" smatch reports: drivers/gpu/drm/drm_framebuffer.c:654 drm_mode_getfb2_ioctl() error: uninitialized symbol 'ret'. 'ret' is possibly not set when there are no errors, causing the error above. I can't say if that ever happens in real-life, but in any case I think it is good to initialize 'ret' to 0. Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/drm_framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c index 09e289fca5c3..3cc0ffc28e86 100644 --- a/drivers/gpu/drm/drm_framebuffer.c +++ b/drivers/gpu/drm/drm_framebuffer.c @@ -583,7 +583,7 @@ int drm_mode_getfb2_ioctl(struct drm_device *dev, struct drm_mode_fb_cmd2 *r = data; struct drm_framebuffer *fb; unsigned int i; - int ret; + int ret = 0; if (!drm_core_check_feature(dev, DRIVER_MODESET)) return -EINVAL; From patchwork Fri Nov 3 13:14:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 13444533 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 5D878C4167D for ; Fri, 3 Nov 2023 13:14:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4E0EE10E9DD; Fri, 3 Nov 2023 13:14:30 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7F57710E9EB for ; Fri, 3 Nov 2023 13:14:26 +0000 (UTC) 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 A044A1AB9; Fri, 3 Nov 2023 14:14:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1699017247; bh=GfkdOn7Nflp8EiHOQgGZ6pujA7kOojVrCOcgPLu3P0U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=t1lT52PtrE29xwCBZBAGorMm/7OJBcmJZsf7CyobzPjEikNJsb1J2f+0zzZDgxjwt Ov0gfsVYyt0qNuYd8s61xVp5gBrVM5BV7DabtsmhuCQhLKfW93MBYpgGwD4EDqr8IF UVNrLVGkqze7OqENw8pwm3yaIH0dX1tJGuhw13Gw= From: Tomi Valkeinen Date: Fri, 03 Nov 2023 15:14:05 +0200 Subject: [PATCH v2 3/4] drm/bridge: cdns-mhdp8546: Fix use of uninitialized variable MIME-Version: 1.0 Message-Id: <20231103-uninit-fixes-v2-3-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 , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Laurent Pinchart , Francesco Dolcini , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , Parshuram Thombare X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=946; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=GfkdOn7Nflp8EiHOQgGZ6pujA7kOojVrCOcgPLu3P0U=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlRPIs0SWDfuK8Zd/LgHa0XySY6imSV4EQKxyEL UP0dzp0Q0aJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZUTyLAAKCRD6PaqMvJYe 9ZVgEACiOAnK10hGiar77wl9mNm1C0ZbQwD9cD9Q1GmjqtoRX4o8sbE2QIdwqWcYH+h2/8xk2QZ 8vhclDAAzwrzhlcc8gv4CR0GttdiT7qu0YKQ6itXkznnggoOn729zetwzNv7RK2zdjFgkYt5ojn 8C/3R7Z5XViGe2/sWANvoqKAYMMxu/AiTosLZ3vDmKHUnEGVjXGoFmAmIIHuHa23GmaaJvEfZjT 26ojKddVhJgpbUcKcRsHnpOfs3isr2DAf4lKcAP7YgBKuR1CasFp9UIrXZEbL8vLCmgtO4vqOCy wmKGv3GKLdmtwYWiFzRU4VFfHee1ojPdUjGrCVQK5I5p6q6H1Qo1uFEG/M4218mYxg6Sk1mbY4R Uq6mPx0HIfXnoEDxrJDlyr3HY+h/N89xQbV6FfGNCV4uY/hCd/+F7rumSfkwqpeDez5ydJPj7Q6 Ia4SUMM/0+AblLDkgmXcKiRg/xpN4tugHGDlw8qKjCVDFddslZ5Gs45m3+dXZiu1KdgWmhYcKRO odpUk3w+SWLmpth1kjF6Jr6M808kkZnNOfOdjQsL9SNKDV6QDTE7jtAWuVUougt24UHUILv0KNS 90DZiqnnJ8znmWjm73QGJqirPHxJITAukk5Rrs+oMJ0Polo1BdqmuSsabsO7npmIMIVoPwoR261 LCljNMeK7DL83Wg== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 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: Tomi Valkeinen , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'ret' could be uninitialized at the end of the function, although it's not clear if that can happen in practice. Fixes: 6a3608eae6d3 ("drm: bridge: cdns-mhdp8546: Enable HDCP") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c index 946212a95598..5e3b8edcf794 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c @@ -403,7 +403,8 @@ static int _cdns_mhdp_hdcp_disable(struct cdns_mhdp_device *mhdp) static int _cdns_mhdp_hdcp_enable(struct cdns_mhdp_device *mhdp, u8 content_type) { - int ret, tries = 3; + int ret = -EINVAL; + int tries = 3; u32 i; for (i = 0; i < tries; i++) { From patchwork Fri Nov 3 13:14:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 13444534 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 3A4E4C4332F for ; Fri, 3 Nov 2023 13:14:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3DBF910E9DF; Fri, 3 Nov 2023 13:14:32 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8EFD010E9DD for ; Fri, 3 Nov 2023 13:14:27 +0000 (UTC) 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 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 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 , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Laurent Pinchart , Francesco Dolcini , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , Parshuram Thombare 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-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: Tomi Valkeinen , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- 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; } }