Skip to content

Commit a91b05f

Browse files
committed
Merge tag 'sunxi-clk-fixes-for-5.18-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-fixes
Pull Allwinner clk fixes from Jernej Skrabec: - Add missing sentinel - check return value for platform_get_resource() - mark rtc-32k as critical * tag 'sunxi-clk-fixes-for-5.18-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource() clk: sunxi-ng: sun6i-rtc: Mark rtc-32k as critical clk: sunxi-ng: fix not NULL terminated coccicheck error
2 parents 6deb9bf + f58ca21 commit a91b05f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/clk/sunxi-ng/ccu-sun6i-rtc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ static struct clk_init_data rtc_32k_init_data = {
241241
.ops = &ccu_mux_ops,
242242
.parent_hws = rtc_32k_parents,
243243
.num_parents = ARRAY_SIZE(rtc_32k_parents), /* updated during probe */
244+
.flags = CLK_IS_CRITICAL,
244245
};
245246

246247
static struct ccu_mux rtc_32k_clk = {
@@ -346,6 +347,7 @@ static const struct of_device_id sun6i_rtc_ccu_match[] = {
346347
.compatible = "allwinner,sun50i-r329-rtc",
347348
.data = &sun50i_r329_rtc_ccu_data,
348349
},
350+
{},
349351
};
350352

351353
int sun6i_rtc_ccu_probe(struct device *dev, void __iomem *reg)

drivers/clk/sunxi/clk-sun9i-mmc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev)
109109
spin_lock_init(&data->lock);
110110

111111
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
112+
if (!r)
113+
return -EINVAL;
112114
/* one clock/reset pair per word */
113115
count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
114116
data->membase = devm_ioremap_resource(&pdev->dev, r);

0 commit comments

Comments
 (0)