Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1480366pxb; Thu, 4 Mar 2021 12:25:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjuQeNJmiwGKFjYYOkROHorD+kDXTI5GogGcE9Y2izQwxl1AhJkbocRTyShf0Fd47CsSUQ X-Received: by 2002:aa7:c9cf:: with SMTP id i15mr6405209edt.296.1614889542646; Thu, 04 Mar 2021 12:25:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614889542; cv=none; d=google.com; s=arc-20160816; b=e64mdWcfuAvBKVvV8dgRbZs/rVMWrJe4Ig6do77Q84OBHM5opD8Dn64Se+JWh00XMX VuAny+7giQp5pEMojKzoc3wXDfbfSip+JVG99/En1GLcZ4zCJXRcznhP74Cq0ivZKC/v 7rMkzGQM3chXFfsjlOyGkY7kghGZ+UOLkPIeTEE2GtvAd7qUrRWScKEA5PuF+E+EV92C MRVeePA3K828IWi4b6dAGCSoDWog9MRFN6kSlP3ugNV7cNYvGpVyfXDje/y3DUyCEYcN LqcsxPfi8CvyWbCTqFwsZZEZa1LKwKGRJkHXJs6B+B1P4ctyiEnw2UosyD4lEFPvoo48 iSIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=wbXZh+y7Wwg/hAULiKSl5XcTTJtTCwhI9jiu/kuN7UU=; b=nKutBlYjL6CdaowPwujnsSgi1kU5WvACkYMZ1uMXehmm5SZO8QwVGbIoyonPV7KCCV p0M7EEy/S10prvM1rKDgY3V3nYG0AC0uo1B3/LmCrW8H6hUKkKqPUYKBd0so+l57m6qm csSbC7fUo+rNaNt/X5M+wAXfgX3+HZMlTnGaUvWYOZxkooslo7f1iPh4crlJn87L/fXz UOW30wzh0sygsi4QLgozRiCBvpjhTnn9xREgs9CDjrbPQI0fWHwP98krBcHsf7awWOuG 3budlbWgVXHKIBaDDPZhmK2Jvr/mUUk+F8VCsTxPKfL0ReAuDcCTThiC+ZyVBZ/+oOF2 tfMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TpxZtlx9; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m9si140720ejr.535.2021.03.04.12.25.19; Thu, 04 Mar 2021 12:25:42 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TpxZtlx9; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1447123AbhCBUuq (ORCPT + 99 others); Tue, 2 Mar 2021 15:50:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344629AbhCBRwJ (ORCPT ); Tue, 2 Mar 2021 12:52:09 -0500 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AD54C061221; Tue, 2 Mar 2021 09:51:17 -0800 (PST) Received: by mail-ot1-x336.google.com with SMTP id s3so20830316otg.5; Tue, 02 Mar 2021 09:51:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wbXZh+y7Wwg/hAULiKSl5XcTTJtTCwhI9jiu/kuN7UU=; b=TpxZtlx9zhSj5DDnDsYDla0q4cE4cGz3bke3+P6NzMosLpXoRLfFhOR+4q1q4iNdt9 Us/EyQ3dq9wGSQK3IXeDBbioRv8i366HWBIfEMxDQ4mXNhhzhb0WC27LQ/omHh4k8+jz KWjh8/3Wfjr47eA+kvLj//+JNSZux8xNyLLKIcSDdFMMaSfgUnMwXxKMC1IStHsBWno2 hD6cYKKOyvZItGEhPwErlJGvycxSTS9ycmdRowc9KvOZ5X5IfEjt69DFpySEfUqwmX/L moGAb6FhFwY9GcmNI5XSCW9lcI53YETfrgtHcZNye2VyW10iFdtK/EhLL8TuWLDJBFt2 JFug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wbXZh+y7Wwg/hAULiKSl5XcTTJtTCwhI9jiu/kuN7UU=; b=jjgpD2BdKiWp7JERDV1inkmUiin4qFIabmUexsx5bzTHb9/5pbKtOf6syrmgXjmpg1 PTcu9ZSwwf+wmbcUhZCD498eWhFXa2XHmQ2gYE8Bj5iYv97yPG36/u6CeF9QYCDx5vT1 4gCKj8QUzv8NH6pESM9dh2LuEtjzocF05RPv49Vo99mHqiTShtd6b3kS/1QTV8NLiB6y BxZWStzBK8oIwA0YFaBlEObSkmZn7fA80QJHVW8Ys12+0QS3De3GCjwokExlczpGRNDs 4JQzkSybm48eulr0SGW6luFsXAdJxw3kQbKe8+23w+v4bv7n3OZ3IYBXpFaQd0ubskml cvNw== X-Gm-Message-State: AOAM533D/iO7cp096XRefKX+wILjX0EzI7HBgwsRlcc928iV36o7S+S4 JtKVDiRmHfZ6ALlwuJMkm3hDCdGU6fEeofAeTvQ= X-Received: by 2002:a9d:20c3:: with SMTP id x61mr8005751ota.311.1614707476945; Tue, 02 Mar 2021 09:51:16 -0800 (PST) MIME-Version: 1.0 References: <20210302140509.8466-1-colin.king@canonical.com> In-Reply-To: From: Alex Deucher Date: Tue, 2 Mar 2021 12:51:05 -0500 Message-ID: Subject: Re: [PATCH][next] drm/amd/display: fix the return of the uninitialized value in ret To: Harry Wentland Cc: Colin King , Leo Li , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , David Airlie , Daniel Vetter , Anson Jacob , Mikita Lipski , amd-gfx list , Maling list - DRI developers , kernel-janitors@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Tue, Mar 2, 2021 at 10:03 AM Harry Wentland wrote: > > On 2021-03-02 9:05 a.m., Colin King wrote: > > From: Colin Ian King > > > > Currently if stream->signal is neither SIGNAL_TYPE_DISPLAY_PORT_MST or > > SIGNAL_TYPE_DISPLAY_PORT then variable ret is uninitialized and this is > > checked for > 0 at the end of the function. Ret should be initialized, > > I believe setting it to zero is a correct default. > > > > Addresses-Coverity: ("Uninitialized scalar variable") > > Fixes: bd0c064c161c ("drm/amd/display: Add return code instead of boolean for future use") > > Signed-off-by: Colin Ian King > > Reviewed-by: Harry Wentland > > Harry > > > --- > > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c > > index 5159399f8239..5750818db8f6 100644 > > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c > > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c > > @@ -530,7 +530,7 @@ bool dm_helpers_dp_write_dsc_enable( > > { > > uint8_t enable_dsc = enable ? 1 : 0; > > struct amdgpu_dm_connector *aconnector; > > - uint8_t ret; > > + uint8_t ret = 0; > > > > if (!stream) > > return false; > > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel