From: Ziran Zhang <zhangcoder@yeah.net>
To: markus.elfring@web.de
Cc: airlied@gmail.com, alexander.deucher@amd.com,
amd-gfx@lists.freedesktop.org, christian.koenig@amd.com,
dri-devel@lists.freedesktop.org, harry.wentland@amd.com,
linux-kernel@vger.kernel.org, simona@ffwll.ch,
siqueira@igalia.com, sunpeng.li@amd.com, zhangcoder@yeah.net
Subject: Re: [PATCH] drm/amd/display: Remove redundant NULL check before kfree() in mod_power_create()
Date: Sat, 27 Jun 2026 17:54:54 +0800 [thread overview]
Message-ID: <20260627095616.4479-1-zhangcoder@yeah.net> (raw)
In-Reply-To: <dcc01255-8c9a-41db-80b8-e4482ec12789@web.de>
On Sat, 27 Jun 2026 11:43:25 +0200, Markus Elfring wrote:
> …
> > +++ 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
Yes, you're right. I will send a v2 with this fixed.
Regards,
Ziran Zhang
next prev parent reply other threads:[~2026-06-27 9:57 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 ` [PATCH] drm/amd/display: Remove redundant NULL check before kfree() " Markus Elfring
2026-06-27 9:54 ` Ziran Zhang [this message]
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=20260627095616.4479-1-zhangcoder@yeah.net \
--to=zhangcoder@yeah.net \
--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=markus.elfring@web.de \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.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