forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/acpi/arm64/gtdt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * ARM Specific GTDT table Support
34 *
....@@ -5,10 +6,6 @@
56 * Author: Daniel Lezcano <daniel.lezcano@linaro.org>
67 * Fu Wei <fu.wei@linaro.org>
78 * Hanjun Guo <hanjun.guo@linaro.org>
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License version 2 as
11
- * published by the Free Software Foundation.
129 */
1310
1411 #include <linux/acpi.h>
....@@ -399,7 +396,7 @@
399396 */
400397 ret = acpi_gtdt_init(table, &timer_count);
401398 if (ret || !timer_count)
402
- return ret;
399
+ goto out_put_gtdt;
403400
404401 for_each_platform_timer(platform_timer) {
405402 if (is_non_secure_watchdog(platform_timer)) {
....@@ -413,6 +410,8 @@
413410 if (gwdt_count)
414411 pr_info("found %d SBSA generic Watchdog(s).\n", gwdt_count);
415412
413
+out_put_gtdt:
414
+ acpi_put_table(table);
416415 return ret;
417416 }
418417