mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harry Wentland <harry.wentland@amd.com>
To: Colin King <colin.king@canonical.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	David Airlie <airlied@linux.ie>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Cc: "kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/amd/display: remove redundant null check of array 'data'
Date: Fri, 15 Dec 2017 10:05:39 -0500	[thread overview]
Message-ID: <299963e5-5847-a2ca-0282-40ab3cd0f590@amd.com> (raw)
In-Reply-To: <20171215105343.11372-1-colin.king@canonical.com>

On 2017-12-15 05:53 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.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@canonical.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.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);
>  
> 

      parent reply	other threads:[~2017-12-15 15:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15 10:53 Colin King
2017-12-15 12:18 ` Christian König
2017-12-15 15:05 ` Harry Wentland [this message]

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=299963e5-5847-a2ca-0282-40ab3cd0f590@amd.com \
    --to=harry.wentland@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=airlied@linux.ie \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=colin.king@canonical.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®