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: <299963e5-5847-a2ca-0282-40ab3cd0f590@amd.com>
Date:   Fri, 15 Dec 2017 10:05:39 -0500
From:   Harry Wentland <harry.wentland@....com>
To:     Colin King <colin.king@...onical.com>,
        "Koenig, Christian" <Christian.Koenig@....com>,
        David Airlie <airlied@...ux.ie>,
        "amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
Cc:     "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/amd/display: remove redundant null check of array
 'data'

On 2017-12-15 05:53 AM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> The null check on aconnector->base.edid_blob_ptr->data is redundant
> since data is an array and can never be null.  Remove it.
> 
> Detected by CoverityScan, CID#1460369 ("Array compared against 0")
> 
> Signed-off-by: Colin Ian King <colin.king@...onical.com>

Reviewed-by: Harry Wentland <harry.wentland@....com>

Harry

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index ccbf10e3bbb6..c388778dbba3 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -2725,8 +2725,7 @@ static void create_eml_sink(struct amdgpu_dm_connector *aconnector)
>  	};
>  	struct edid *edid;
>  
> -	if (!aconnector->base.edid_blob_ptr ||
> -		!aconnector->base.edid_blob_ptr->data) {
> +	if (!aconnector->base.edid_blob_ptr) {
>  		DRM_ERROR("No EDID firmware found on connector: %s ,forcing to OFF!\n",
>  				aconnector->base.name);
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ