kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Colin King <colin.king@canonical.com>,
	David Airlie <airlied@linux.ie>,
	Harry Wentland <harry.wentland@amd.com>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: kernel-janitors@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 12:18:45 +0000	[thread overview]
Message-ID: <034400d8-22ec-f5fe-a958-6c61e487784a@amd.com> (raw)
In-Reply-To: <20171215105343.11372-1-colin.king@canonical.com>

Am 15.12.2017 um 11:53 schrieb Colin King:
> 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>

Acked-by: Christian König <christian.koenig@amd.com>

> ---
>   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);
>   

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15 10:53 [PATCH] drm/amd/display: remove redundant null check of array 'data' Colin King
2017-12-15 12:18 ` Christian König [this message]
     [not found] ` <20171215105343.11372-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2017-12-15 15:05   ` Harry Wentland
2019-05-11 12:31 ` [PATCH] drm/amd/display: remove redundant assignment to variable actual_clock Colin King
2020-04-10 11:46 ` [PATCH] drm/amd/display: remove redundant assignment to variable dp_ref_clk_khz Colin King
2020-04-13 16:58   ` Alex Deucher
2020-07-01 14:59 ` [PATCH] drm/amd/display: remove redundant initialization of variable result Colin King
2020-07-01 17:05   ` Alex Deucher
2020-07-23 14:36 ` Colin King
2020-07-23 20:23   ` Alex Deucher

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=034400d8-22ec-f5fe-a958-6c61e487784a@amd.com \
    --to=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=harry.wentland@amd.com \
    --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;
as well as URLs for NNTP newsgroup(s).