Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1100937pxb; Fri, 22 Jan 2021 07:12:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVMnu2BppotflfmkRjO9ihmCJYOl5HOlhr3BFugnfeTDu8UZlWRXF7xC2snWN5ULfsNFL+ X-Received: by 2002:aa7:d5d5:: with SMTP id d21mr3586108eds.252.1611328348108; Fri, 22 Jan 2021 07:12:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611328348; cv=none; d=google.com; s=arc-20160816; b=vq1WOkpMtS5ssaOw6RVqhgulJf5BBNDng2hXaTO76zcniUeKpETdUqohvSrWBy/u6A uaPy/eFBtTksBg9FhYwwmhXMhGJvYLbGghtn5cZoedDExecwemRQIdvB9md+ZW3HTozU aFWObpijnFb9yiKZxyhLmbnwBmuxsxv6VHxRcVCgScwamDM+mvcD93f3SPtZkY2xXTmM 6qMdtdvLZA3iYS3T8kHNUFGOSv5p7J02Is75vgiSu6Rw8VzpXit9/PxauIdy7qBoY08r FkmfK9a4o6ghyCM5OscXNYYyR2YDuFynmhMQkVY8Qza5QBuwquqQqRUSVInUcKx8kyPu hgzw== 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=nthCfNFeuSr3gB7uF0bfNYxhYKKXmWTjbeE9e1c2PuE=; b=EHYeUVvGhoFilQg8oS1xe9i9o2Ib6oM2YUxi/VyBJrvmAA/DH+9BsuQKEdZUPUC4kK iyAve9weee+q8dn/2txSEBHUeOrR01FLjMUGZBfTBiUHfSFwUVihJ9djVVnarS4qU5Rd Ao4A7+9rSxeUuwNSp059HX5dRsNY8h+DejsnR1Nf8qZBBVWVbtgqBHdU8tTv1PP0PNyT sMLeLvoBbOWiPDKWEXgGYnKiDbcDQOnIi76VhQZfr/M7/KghAZeqtG4DZdGp73AuPq8Q 1W/9cpp98G8O2VsJ2Zfffp/vwMta+xCKMLu61KcZgyc2SOq6cwwWJGWywim0O8IRvaF1 X1pw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oq8si3001262ejb.537.2021.01.22.07.12.01; Fri, 22 Jan 2021 07:12:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729140AbhAVPLK (ORCPT + 99 others); Fri, 22 Jan 2021 10:11:10 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:45201 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729097AbhAVPKo (ORCPT ); Fri, 22 Jan 2021 10:10:44 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l2y4U-00008M-10; Fri, 22 Jan 2021 15:09:58 +0000 From: Colin King To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Ramalingam C , Anshuman Gupta , Uma Shankar , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] drm/i915/hdcp: Fix return of value in uninitialized variable ret Date: Fri, 22 Jan 2021 15:09:57 +0000 Message-Id: <20210122150957.209779-1-colin.king@canonical.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King Currently when there are other connectors on the port using HDCP the function _intel_hdcp_disable returns a garbage uninitialized value in variable ret. I believe the intention is to return 0, so return this literal value instead of the value in ret. Addresses-Coverity: ("Uninitialized scalar return") Fixes: 899c8762f981 ("drm/i915/hdcp: Configure HDCP2.2 MST steram encryption status") Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/display/intel_hdcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c index db8dff2eeb0a..a0e7b0bf892b 100644 --- a/drivers/gpu/drm/i915/display/intel_hdcp.c +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c @@ -883,7 +883,7 @@ static int _intel_hdcp_disable(struct intel_connector *connector) * until it disabled HDCP encryption for all connectors in MST topology. */ if (dig_port->num_hdcp_streams > 0) - return ret; + return 0; hdcp->hdcp_encrypted = false; intel_de_write(dev_priv, HDCP_CONF(dev_priv, cpu_transcoder, port), 0); -- 2.29.2