Skip to content

Commit

Permalink
Merge tag 'sunxi-clk-fixes-for-5.18-2' of https://git.kernel.org/pub/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Stephen Boyd committed Apr 25, 2022
2 parents 6deb9bf + f58ca21 commit a91b05f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/clk/sunxi-ng/ccu-sun6i-rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ static struct clk_init_data rtc_32k_init_data = {
.ops = &ccu_mux_ops,
.parent_hws = rtc_32k_parents,
.num_parents = ARRAY_SIZE(rtc_32k_parents), /* updated during probe */
.flags = CLK_IS_CRITICAL,
};

static struct ccu_mux rtc_32k_clk = {
Expand Down Expand Up @@ -346,6 +347,7 @@ static const struct of_device_id sun6i_rtc_ccu_match[] = {
.compatible = "allwinner,sun50i-r329-rtc",
.data = &sun50i_r329_rtc_ccu_data,
},
{},
};

int sun6i_rtc_ccu_probe(struct device *dev, void __iomem *reg)
Expand Down
2 changes: 2 additions & 0 deletions drivers/clk/sunxi/clk-sun9i-mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a91b05f

Please sign in to comment.