Skip to content

Commit 16868b3

Browse files
committed
Merge tag 'omap-for-v6.20/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap into soc/arm
ARM: omap: soc updates for v6.20 * tag 'omap-for-v6.20/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap: ARM: omap1: drop unused Kconfig symbol ARM: omap2: Fix reference count leaks in omap_control_init() Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 0294324 + dc717e2 commit 16868b3

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

arch/arm/mach-omap1/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ menuconfig ARCH_OMAP1
44
depends on ARCH_MULTI_V4T || ARCH_MULTI_V5
55
depends on CPU_LITTLE_ENDIAN
66
depends on ATAGS
7-
select ARCH_HAS_HOLES_MEMORYMODEL
87
select ARCH_OMAP
98
select CLKSRC_MMIO
109
select FORCE_PCI if PCCARD

arch/arm/mach-omap2/control.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ int __init omap2_control_base_init(void)
732732
*/
733733
int __init omap_control_init(void)
734734
{
735-
struct device_node *np, *scm_conf;
735+
struct device_node *np, *scm_conf, *clocks_node;
736736
const struct of_device_id *match;
737737
const struct omap_prcm_init_data *data;
738738
int ret;
@@ -753,16 +753,19 @@ int __init omap_control_init(void)
753753

754754
if (IS_ERR(syscon)) {
755755
ret = PTR_ERR(syscon);
756-
goto of_node_put;
756+
goto err_put_scm_conf;
757757
}
758758

759-
if (of_get_child_by_name(scm_conf, "clocks")) {
759+
clocks_node = of_get_child_by_name(scm_conf, "clocks");
760+
if (clocks_node) {
761+
of_node_put(clocks_node);
760762
ret = omap2_clk_provider_init(scm_conf,
761763
data->index,
762764
syscon, NULL);
763765
if (ret)
764-
goto of_node_put;
766+
goto err_put_scm_conf;
765767
}
768+
of_node_put(scm_conf);
766769
} else {
767770
/* No scm_conf found, direct access */
768771
ret = omap2_clk_provider_init(np, data->index, NULL,
@@ -780,6 +783,9 @@ int __init omap_control_init(void)
780783

781784
return 0;
782785

786+
err_put_scm_conf:
787+
if (scm_conf)
788+
of_node_put(scm_conf);
783789
of_node_put:
784790
of_node_put(np);
785791
return ret;

0 commit comments

Comments
 (0)