Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1011194rdg; Fri, 13 Oct 2023 07:48:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcAawUP9Krg+Kh6BNgg3o0sc5YH6xnLc36gtazKwn+A2ToOYn9uMLSUPr5Rc3Ua/Ks4rw+ X-Received: by 2002:a17:90a:2c86:b0:27d:5174:442b with SMTP id n6-20020a17090a2c8600b0027d5174442bmr527521pjd.7.1697208515814; Fri, 13 Oct 2023 07:48:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697208515; cv=none; d=google.com; s=arc-20160816; b=u6LgNZtLUvaZaCUkIvtqdv87kf3SQMK1gKYpUcbRuiBULJh9VfB5LGxGOkZRUYOHjQ wdjXzQ+yLH4IbVh3tWH+6h07Dgt03wAy8LqzP8P5/rOD7I48kLWiX/wzX6W5TmEtAUfD YWsuSvlBoMVvnPBZokl97Ic5Atm+0IPhhqllBE8gHhqZRzj+NqSJ6QrKJvEkcIdtugeS Y4x3vSNQTjqXsNOY8VTB3gDHyO3vZK03myKfvYYPODfwnAXeqiiOS11V88K6JOj+F5GJ Jw6OiWUvjA2269DVMqiXDMW7w4eBlIE3FlWueb3vATpV24Fl7aAN48ih7w1yJZ/v+9mm /tJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ckk6cNWGOxT1Akj3n6Hkpq57fhH58BNjSKXwH15ZaTE=; fh=F3LmBNvcNN7YgxAp9HUyuzTzb/H1NZG2X8bt1myW55w=; b=iZWIUhX79T67JUh/x3zAEZw/nXLsidg8WciB8jPp/5v8mUc4Q4XYBNvHBROIzd/O8u srcwv7dOruFvrmztSQsaYcQs88JvUGM4oSxZVReDdVqGA7Gs4EofKRVnzc5jwrrOYSpq NgSqiytCONX+NZ8APCA7udxXiI2Zq/+A8PSH2qObyPxeL9aYQ3giE378TZaBGXd3GYze Ee9Fk81cN5/xmO6SK5pnKBfxoKT1V/Oz/doGRaNJaS9BgVlPKjxXNzQDzR1fvO1tmZKu taDNcwgdpEZpQGkg0EQHGUuPSckG2MENRLpjTmoVxNnoPZYNlOzw78e9UyCDWvppmtXq rpYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=red-soft.ru Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id pc2-20020a17090b3b8200b0027cd01b6caasi260652pjb.47.2023.10.13.07.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 07:48:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=red-soft.ru Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 6A72181DD269; Fri, 13 Oct 2023 07:48:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232130AbjJMOs0 (ORCPT + 99 others); Fri, 13 Oct 2023 10:48:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229937AbjJMOsZ (ORCPT ); Fri, 13 Oct 2023 10:48:25 -0400 Received: from gw.red-soft.ru (red-soft.ru [188.246.186.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7B72595 for ; Fri, 13 Oct 2023 07:48:22 -0700 (PDT) Received: from localhost.biz (unknown [10.81.81.211]) by gw.red-soft.ru (Postfix) with ESMTPA id DAADE3E0D09; Fri, 13 Oct 2023 17:48:18 +0300 (MSK) From: Artem Chernyshev To: Andrzej Hajda , Neil Armstrong Cc: Artem Chernyshev , Laurent Pinchart , Jonas Karlman , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH] drm/bridge: analogix: anx78xx: Check return value Date: Fri, 13 Oct 2023 17:48:13 +0300 Message-Id: <20231013144813.354353-1-artem.chernyshev@red-soft.ru> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 180612 [Oct 13 2023] X-KLMS-AntiSpam-Version: 6.0.0.2 X-KLMS-AntiSpam-Envelope-From: artem.chernyshev@red-soft.ru X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Auth: dkim=none X-KLMS-AntiSpam-Info: LuaCore: 539 539 807534d9021bfe9ca369c363d15ac993cd93d4d9, {Tracking_from_domain_doesnt_match_to}, red-soft.ru:7.1.1;localhost.biz:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2, FromAlignment: s X-MS-Exchange-Organization-SCL: -1 X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, bases: 2023/10/13 13:20:00 X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, bases: 2023/10/13 11:13:00 #22181246 X-KLMS-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 13 Oct 2023 07:48:33 -0700 (PDT) In anx78xx_start() err value of anx78xx_clear_bits() overwriting without check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Artem Chernyshev --- drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c index 800555aef97f..c966e661b9b9 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c +++ b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c @@ -537,6 +537,10 @@ static int anx78xx_start(struct anx78xx *anx78xx) SP_POWERDOWN_CTRL_REG, SP_HDCP_PD | SP_AUDIO_PD | SP_VIDEO_PD | SP_LINK_PD); + if (err) { + DRM_ERROR("Failed to clear bits: %d\n", err); + goto err_poweroff; + } err = anx78xx_enable_interrupts(anx78xx); if (err) { -- 2.37.3