[<prev] [next>] [day] [month] [year] [list]
Message-ID: <94f2cba6-a407-4a0f-bc66-be75b4dea190@web.de>
Date: Mon, 4 Aug 2025 16:06:26 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Zhen Ni <zhen.ni@...ystack.cn>, linux-acpi@...r.kernel.org
Cc: stable@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
Jassi Brar <jassisinghbrar@...il.com>, Sudeep Holla <sudeep.holla@....com>
Subject: Re: [PATCH v3] mailbox: pcc: Add missed acpi_put_table() to fix
memory leak
> In pcc_mbox_probe(), the PCCT table acquired via acpi_get_table() is
> only released in error paths but not in the success path. Fix a
> permanent ACPI memory leak when the driver successfully initializes. Add
> the goto label 'err_nomem'.
You may use an enumeration for your change description.
* Fix …
* Add … so that a bit of exception handling can be refined.
…> +++ b/drivers/mailbox/pcc.c
…> @@ -827,8 +821,11 @@ static int pcc_mbox_probe(struct platform_device *pdev)
…> +err_nomem:
> + rc = -ENOMEM;
> + goto err;
Please omit such a redundant statement at this proposed place.
> err:
> acpi_put_table(pcct_tbl);
> return rc;
Would a label like “put_table” become helpful here?
Regards,
Markus
Powered by blists - more mailing lists