From: Markus Elfring <Markus.Elfring@web.de>
To: "Navid Emamdoost" <navid.emamdoost@gmail.com>,
"Christian König" <christian.koenig@amd.com>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Navid Emamdoost <emamd001@umn.edu>, Kangjie Lu <kjlu@umn.edu>,
Stephen McCamant <smccaman@umn.edu>,
Alex Deucher <alexander.deucher@amd.com>,
Chunming Zhou <David1.Zhou@amd.com>,
Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
Sam Ravnborg <sam@ravnborg.org>,
Sven Van Asbroeck <thesven73@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v3] drm/amdgpu: fix multiple memory leaks in acp_hw_init
Date: Tue, 1 Oct 2019 13:24:39 +0200 [thread overview]
Message-ID: <3e685bb8-8a76-cda7-2118-a317516b2bf5@web.de> (raw)
In-Reply-To: <20190930212644.9372-1-navid.emamdoost@gmail.com>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> @@ -184,12 +184,12 @@ static struct device *get_mfd_cell_dev(const char *device_name, int r)
…
> + struct i2s_platform_data *i2s_pdata = NULL;
…
I propose to reconsider this update suggestion.
> @@ -231,20 +231,21 @@ static int acp_hw_init(void *handle)
> adev->acp.acp_cell = kcalloc(ACP_DEVS, sizeof(struct mfd_cell),
> GFP_KERNEL);
>
> - if (adev->acp.acp_cell == NULL)
> - return -ENOMEM;
…
I suggest to keep this source code place unchanged (at the moment).
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c#n456
> @@ -393,6 +399,13 @@ static int acp_hw_init(void *handle)
> val &= ~ACP_SOFT_RESET__SoftResetAud_MASK;
> cgs_write_register(adev->acp.cgs_device, mmACP_SOFT_RESET, val);
> return 0;
> +
> +failure:
> + kfree(i2s_pdata);
> + kfree(adev->acp.acp_res);
> + kfree(adev->acp.acp_cell);
> + kfree(adev->acp.acp_genpd);
> + return ret;
> }
>
> /**
I would prefer separate jump targets for efficient exception handling.
Please choose more appropriate labels for this function implementation.
> ---
I suggest to replace this second delimiter by a blank line.
Regards,
Markus
next prev parent reply other threads:[~2019-10-01 11:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 16:09 [PATCH] drm/amdgpu: fix multiple memory leaks Navid Emamdoost
2019-09-18 17:31 ` Koenig, Christian
2019-09-18 19:05 ` [PATCH v2] " Navid Emamdoost
2019-09-18 19:45 ` Sven Van Asbroeck
2019-09-19 8:03 ` Koenig, Christian
2019-09-19 14:28 ` Sven Van Asbroeck
2019-09-19 16:48 ` Koenig, Christian
2019-09-30 21:26 ` [PATCH v3] drm/amdgpu: fix multiple memory leaks in acp_hw_init Navid Emamdoost
2019-10-01 11:24 ` Markus Elfring [this message]
2019-10-01 12:19 ` Koenig, Christian
2019-10-02 3:46 ` [PATCH v4] " Navid Emamdoost
2019-10-02 5:47 ` Markus Elfring
2019-10-02 6:58 ` Koenig, Christian
2019-10-02 3:47 ` [PATCH v3] " Navid Emamdoost
2019-09-30 21:31 ` [PATCH v2] drm/amdgpu: fix multiple memory leaks Navid Emamdoost
2019-09-27 16:37 ` Markus Elfring
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=3e685bb8-8a76-cda7-2118-a317516b2bf5@web.de \
--to=markus.elfring@web.de \
--cc=David1.Zhou@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emamd001@umn.edu \
--cc=kernel-janitors@vger.kernel.org \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=navid.emamdoost@gmail.com \
--cc=sam@ravnborg.org \
--cc=smccaman@umn.edu \
--cc=thesven73@gmail.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
Powered by JetHome