spi: acpi: Free resource list at appropriate time
PATCH 1/1 spi: acpi: Free resource list at appropriate time
We do unneeded "double free" (emptying an empty list) in one case.
This is not a critical issue at all, the fix just makes code robust against any possible future changes in the flow.
--- drivers/spi/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi.c +2 -2
@@ -2975,12 +2975,12 @@ struct spi_device *acpi_spi_device_alloc(struct spi_controller *ctlr,INIT_LIST_HEAD (&resource_list); ret =acpi_dev_get_resources (adev, &resource_list, acpi_spi_add_resource, &lookup); -acpi_dev_free_resource_list (&resource_list); -if (ret <0 )/* Found SPI in _CRS but it points to another controller */ return ERR_PTR (ret); +acpi_dev_free_resource_list (&resource_list); +if (!lookup.max_speed_hz &&ACPI_SUCCESS (acpi_get_parent (adev->handle, &parent_handle)) &&device_match_acpi_handle (lookup.ctlr->dev.parent, parent_handle)) {
Signature · 1 line
2.50.1
Mark Brown
maintainerQuoted 1 line · Andy Shevchenko
spi: acpi: Free resource list at appropriate time
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.2
Thanks!
[1/1] spi: acpi: Free resource list at appropriate time
https://git.kernel.org/broonie/spi/c/12aad822fb9a
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark