lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ee4b2ca0-137d-4bbf-8d44-25c263bbac55@amd.com>
Date: Wed, 2 Apr 2025 19:30:17 -0600
From: Alex Hung <alex.hung@....com>
To: Ваторопин Андрей
 <a.vatoropin@...t.ru>, Harry Wentland <harry.wentland@....com>
Cc: Leo Li <sunpeng.li@....com>, Rodrigo Siqueira <siqueira@...lia.com>,
 Alex Deucher <alexander.deucher@....com>,
 Christian König <christian.koenig@....com>,
 David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
 Dillon Varone <dillon.varone@....com>, Roman Li <roman.li@....com>,
 Ethan Carter Edwards <ethan@...ancedwards.com>,
 Ivan Lipski <ivlipski@....com>,
 Iswara Nagulendran <iswara.nagulendran@....com>,
 Hersen Wu <hersenxs.wu@....com>, Rafal Ostrowski <rostrows@....com>,
 Alvin Lee <alvin.lee2@....com>, Aric Cyr <aric.cyr@....com>,
 "Dr. David Alan Gilbert" <linux@...blig.org>,
 Srinivasan Shanmugam <srinivasan.shanmugam@....com>,
 "amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
 "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 "lvc-project@...uxtesting.org" <lvc-project@...uxtesting.org>
Subject: Re: [PATCH] drm/amd/display: Remove the redundant NULL check

Reviewed-by: Alex Hung <alex.hung@....com>

On 4/2/25 08:21, Ваторопин Андрей wrote:
> From: Andrey Vatoropin <a.vatoropin@...t.ru>
> 
> Static analysis shows that pointer "timing" cannot be NULL because it
> points to the object "struct dc_crtc_timing".
> 
> Remove the extra NULL check. It is meaningless and harms the readability
> of the code.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Signed-off-by: Andrey Vatoropin <a.vatoropin@...t.ru>
> ---
>   drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
> index 13202ce30d66..76e8c4dcf339 100644
> --- a/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
> @@ -1891,8 +1891,6 @@ static int get_refresh_rate(struct dc_state *context)
>   
>   	/* check if refresh rate at least 120hz */
>   	timing = &context->streams[0]->timing;
> -	if (timing == NULL)
> -		return 0;
>   
>   	h_v_total = timing->h_total * timing->v_total;
>   	if (h_v_total == 0)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ