mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hamza Mahfooz <hamza.mahfooz@amd.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
	Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Cc: "Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Pan, Xinhui" <Xinhui.Pan@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Nicholas Kazlauskas" <nicholas.kazlauskas@amd.com>,
	"Anthony Koo" <Anthony.Koo@amd.com>,
	"Josip Pavic" <Josip.Pavic@amd.com>,
	"Leon Huang" <Leon.Huang1@amd.com>,
	"Mounika Adhuri" <moadhuri@amd.com>,
	"Lewis Huang" <lewis.huang@amd.com>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] drm/amd/display: Fix && vs || typos
Date: Fri, 9 Feb 2024 12:13:55 -0500	[thread overview]
Message-ID: <e627dbef-5d0a-4e22-8aec-2a51d860ba1c@amd.com> (raw)
In-Reply-To: <7482be2a-aca1-41dd-bb6e-d547571b9507@moroto.mountain>

On 2/9/24 08:02, Dan Carpenter wrote:
> These ANDs should be ORs or it will lead to a NULL dereference.
> 
> Fixes: fb5a3d037082 ("drm/amd/display: Add NULL test for 'timing generator' in 'dcn21_set_pipe()'")
> Fixes: 886571d217d7 ("drm/amd/display: Fix 'panel_cntl' could be null in 'dcn21_set_backlight_level()'")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Applied, thanks!

> ---
>   drivers/gpu/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c
> index 5c7f380a84f9..7252f5f781f0 100644
> --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c
> +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c
> @@ -211,7 +211,7 @@ void dcn21_set_pipe(struct pipe_ctx *pipe_ctx)
>   	struct dmcu *dmcu = pipe_ctx->stream->ctx->dc->res_pool->dmcu;
>   	uint32_t otg_inst;
>   
> -	if (!abm && !tg && !panel_cntl)
> +	if (!abm || !tg || !panel_cntl)
>   		return;
>   
>   	otg_inst = tg->inst;
> @@ -245,7 +245,7 @@ bool dcn21_set_backlight_level(struct pipe_ctx *pipe_ctx,
>   	struct panel_cntl *panel_cntl = pipe_ctx->stream->link->panel_cntl;
>   	uint32_t otg_inst;
>   
> -	if (!abm && !tg && !panel_cntl)
> +	if (!abm || !tg || !panel_cntl)
>   		return false;
>   
>   	otg_inst = tg->inst;
-- 
Hamza


      parent reply	other threads:[~2024-02-09 17:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09 13:02 Dan Carpenter
2024-02-09 14:12 ` Koo, Anthony
2024-02-09 17:13 ` Hamza Mahfooz [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=e627dbef-5d0a-4e22-8aec-2a51d860ba1c@amd.com \
    --to=hamza.mahfooz@amd.com \
    --cc=Anthony.Koo@amd.com \
    --cc=Josip.Pavic@amd.com \
    --cc=Leon.Huang1@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dan.carpenter@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lewis.huang@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moadhuri@amd.com \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=srinivasan.shanmugam@amd.com \
    --cc=sunpeng.li@amd.com \
    /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®