AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: "Ziran Zhang" <zhangcoder@yeah.net>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>, "Simona Vetter" <simona@ffwll.ch>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Rodrigo Siqueira <siqueira@igalia.com>
Subject: Re: [PATCH] drm/amd/display: Remove redundant NULL check before kfree() in mod_power_create()
Date: Sat, 27 Jun 2026 11:43:25 +0200	[thread overview]
Message-ID: <dcc01255-8c9a-41db-80b8-e4482ec12789@web.de> (raw)
In-Reply-To: <20260627092612.5282-1-zhangcoder@yeah.net>

…
> +++ b/drivers/gpu/drm/amd/display/modules/power/power.c
> @@ -270,12 +270,10 @@ struct mod_power *mod_power_create(struct dc *dc,
>  fail_bad_brightness_range:
>  fail_construct:
>  	for (i = 0; i < MOD_POWER_MAX_CONCURRENT_STREAMS; i++) {
> -		if (core_power->map[i].psr_context)
> -			kfree(core_power->map[i].psr_context);
> +		kfree(core_power->map[i].psr_context);
>  	}

May curly brackets be omitted here?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v7.1#n197

Regards,
Markus

  reply	other threads:[~2026-06-29  7:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-27  9:26 [PATCH] drm/amd/display: Remove redundant NULL check before kfree in mod_power_create() Ziran Zhang
2026-06-27  9:43 ` Markus Elfring [this message]
2026-06-27  9:54   ` [PATCH] drm/amd/display: Remove redundant NULL check before kfree() " Ziran Zhang
2026-06-27 10:09 ` [PATCH v2] drm/amd/display: Remove redundant NULL check before kfree " Ziran Zhang
2026-06-27 11:53   ` Markus Elfring
2026-06-27 13:07     ` [PATCH] drm/amd/display: Remove redundant NULL check before kfree() " Ziran Zhang
2026-06-27 13:13   ` [PATCH v3] " Ziran Zhang

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=dcc01255-8c9a-41db-80b8-e4482ec12789@web.de \
    --to=markus.elfring@web.de \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=siqueira@igalia.com \
    --cc=sunpeng.li@amd.com \
    --cc=zhangcoder@yeah.net \
    /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