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