diff options
Diffstat (limited to 'drivers/clk/sunxi')
-rw-r--r-- | drivers/clk/sunxi/Kconfig | 4 | ||||
-rw-r--r-- | drivers/clk/sunxi/clk-sun9i-mmc.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clk/sunxi/Kconfig b/drivers/clk/sunxi/Kconfig index 3fba3d3ac9a2..1c4e543366dd 100644 --- a/drivers/clk/sunxi/Kconfig +++ b/drivers/clk/sunxi/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only menuconfig CLK_SUNXI bool "Legacy clock support for Allwinner SoCs" - depends on ARCH_SUNXI || COMPILE_TEST + depends on (ARM && ARCH_SUNXI) || COMPILE_TEST default y if CLK_SUNXI @@ -19,7 +19,6 @@ config CLK_SUNXI_CLOCKS config CLK_SUNXI_PRCM_SUN6I bool "Legacy A31 PRCM driver" - select MFD_SUN6I_PRCM default y help Legacy clock driver for the A31 PRCM clocks. Those are @@ -27,7 +26,6 @@ config CLK_SUNXI_PRCM_SUN6I config CLK_SUNXI_PRCM_SUN8I bool "Legacy sun8i PRCM driver" - select MFD_SUN6I_PRCM default y help Legacy clock driver for the sun8i family PRCM clocks. diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c b/drivers/clk/sunxi/clk-sun9i-mmc.c index 542b31d6e96d..636bcf2439ef 100644 --- a/drivers/clk/sunxi/clk-sun9i-mmc.c +++ b/drivers/clk/sunxi/clk-sun9i-mmc.c @@ -109,6 +109,8 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev) spin_lock_init(&data->lock); r = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!r) + return -EINVAL; /* one clock/reset pair per word */ count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH); data->membase = devm_ioremap_resource(&pdev->dev, r); |