serdev: acpi: Free resource list at appropriate time
Subsystems (2)
PATCH 1/1 serdev: 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.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/tty/serdev/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serdev/core.c +2 -2
@@ -651,11 +651,11 @@ static int acpi_serdev_do_lookup(struct acpi_device *adev,INIT_LIST_HEAD (&resource_list); ret =acpi_dev_get_resources (adev, &resource_list, acpi_serdev_parse_resource, lookup); -acpi_dev_free_resource_list (&resource_list); -if (ret <0 )return -EINVAL ; +acpi_dev_free_resource_list (&resource_list); +return 0 ; }
Signature · 1 line
2.50.1
Quoted 10 lines · Andy Shevchenko
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.
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/tty/serdev/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)