From: Jani Nikula <jani.nikula@linux.intel.com>
To: Colin King <colin.king@canonical.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Ramalingam C <ramalingam.c@intel.com>,
Anshuman Gupta <anshuman.gupta@intel.com>,
Uma Shankar <uma.shankar@intel.com>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] drm/i915/hdcp: Fix return of value in uninitialized variable ret
Date: Fri, 22 Jan 2021 17:21:02 +0200 [thread overview]
Message-ID: <87y2glj8v5.fsf@intel.com> (raw)
In-Reply-To: <20210122150957.209779-1-colin.king@canonical.com>
On Fri, 22 Jan 2021, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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 <colin.king@canonical.com>
Thanks, but there's already a fix in progress:
http://lore.kernel.org/r/20210119064655.1605-3-anshuman.gupta@intel.com
BR,
Jani.
> ---
> 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);
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2021-01-22 15:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 15:09 [PATCH][next] drm/i915/hdcp: Fix return of value in uninitialized variable ret Colin King
2021-01-22 15:21 ` Jani Nikula [this message]
2021-01-25 10:20 ` Gupta, Anshuman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2glj8v5.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@linux.ie \
--cc=anshuman.gupta@intel.com \
--cc=colin.king@canonical.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ramalingam.c@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=uma.shankar@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox