mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
SoC changes for omaps for v5.11 merge window:
Several non-urgent fixes for various issues found by automated tests. So far we have not been hitting any of these so these can wait for the merge window no problem. -----BEGIN PGP SIGNATURE----- iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAl/Aqg4RHHRvbnlAYXRv bWlkZS5jb20ACgkQG9Q+yVyrpXNEuw//RX3IH2d4SYfQ+4ymTYXv1XoKrh7xd7/t XCXfWAiPF+1EqplDOrSm/qy3QcLUlB+6YfiB8qCY/hmSIAOOSdrzHcx7kelYjDD7 oG8tScqHL6KT8n7xWDgAFpuCizsOVvmkRItpg83e1n7UNf/zt2S0BGjKRXPF2Z7z DTfwHZ5MxkEnutmpLeb+6OW1h1NV4knBVMLhjERNjbKONiXl3DYLmjf2/nPINSAY 1yiKrNdCIm/64Q06M+SeVYGd7FSa90VCKyiYZ5AFYHJtfJP6/EBDx+IGnN2b3tvr FyXH0LmkT8Wa+0HwkZuwS0Xf08aLqCK/nMd0IGkPdjq2OH7qZf9yJPiiBHCXoNb6 gn3LJkRnq1po4zD8+bgOoVUnFnI44AVjRTWWGHLc+oskSO/giDFnwMAdehnX2G/o mP3k8AdKT12Ts6eN5daBQWZTuZG3MI+xJCWjOOgwm52/6s4nsQDd9vU6QDMpmc7I yNidVtNyNkjWy8McBLFZbunStW+3Ictfc6bKOcMtiCvp+yalqxS9MYnb774AJvyG mqyZ+foKuaYO3f/PpkzT1Mqwed5bCkxS4vcNgLC2Kq9+mEtB50qBZe3suG+tOxcO RYak1NzYExx4mk3r7ZDLKKY8ZVZU05uo64Q6pQ4iqfmOKdd8DMlw90wDdNpRQmkp RNRXyuzgFDg= =L1Tn -----END PGP SIGNATURE----- Merge tag 'omap-for-v5.11/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc SoC changes for omaps for v5.11 merge window: Several non-urgent fixes for various issues found by automated tests. So far we have not been hitting any of these so these can wait for the merge window no problem. * tag 'omap-for-v5.11/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP1: clock: Use IS_ERR_OR_NULL() to clean code ARM: OMAP2+: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare ARM: OMAP2+: Remove redundant assignment to variable ret ARM: OMAP2+: Fix kfree NULL pointer in omap2xxx_clkt_vps_init ARM: OMAP2+: Fix memleak in omap2xxx_clkt_vps_init Link: https://lore.kernel.org/r/pull-1606462656-588116@atomide.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
31216ef561
|
|
@ -612,7 +612,7 @@ int clk_enable(struct clk *clk)
|
|||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
if (clk == NULL || IS_ERR(clk))
|
||||
if (IS_ERR_OR_NULL(clk))
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(&clockfw_lock, flags);
|
||||
|
|
@ -627,7 +627,7 @@ void clk_disable(struct clk *clk)
|
|||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (clk == NULL || IS_ERR(clk))
|
||||
if (IS_ERR_OR_NULL(clk))
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&clockfw_lock, flags);
|
||||
|
|
@ -650,7 +650,7 @@ unsigned long clk_get_rate(struct clk *clk)
|
|||
unsigned long flags;
|
||||
unsigned long ret;
|
||||
|
||||
if (clk == NULL || IS_ERR(clk))
|
||||
if (IS_ERR_OR_NULL(clk))
|
||||
return 0;
|
||||
|
||||
spin_lock_irqsave(&clockfw_lock, flags);
|
||||
|
|
@ -670,7 +670,7 @@ long clk_round_rate(struct clk *clk, unsigned long rate)
|
|||
unsigned long flags;
|
||||
long ret;
|
||||
|
||||
if (clk == NULL || IS_ERR(clk))
|
||||
if (IS_ERR_OR_NULL(clk))
|
||||
return 0;
|
||||
|
||||
spin_lock_irqsave(&clockfw_lock, flags);
|
||||
|
|
@ -686,7 +686,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
|
|||
unsigned long flags;
|
||||
int ret = -EINVAL;
|
||||
|
||||
if (clk == NULL || IS_ERR(clk))
|
||||
if (IS_ERR_OR_NULL(clk))
|
||||
return ret;
|
||||
|
||||
spin_lock_irqsave(&clockfw_lock, flags);
|
||||
|
|
@ -791,7 +791,7 @@ void clk_preinit(struct clk *clk)
|
|||
|
||||
int clk_register(struct clk *clk)
|
||||
{
|
||||
if (clk == NULL || IS_ERR(clk))
|
||||
if (IS_ERR_OR_NULL(clk))
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
|
|
@ -817,7 +817,7 @@ EXPORT_SYMBOL(clk_register);
|
|||
|
||||
void clk_unregister(struct clk *clk)
|
||||
{
|
||||
if (clk == NULL || IS_ERR(clk))
|
||||
if (IS_ERR_OR_NULL(clk))
|
||||
return;
|
||||
|
||||
mutex_lock(&clocks_mutex);
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ void omap2xxx_clkt_vps_init(void)
|
|||
|
||||
hw = kzalloc(sizeof(*hw), GFP_KERNEL);
|
||||
if (!hw)
|
||||
goto cleanup;
|
||||
return;
|
||||
init.name = "virt_prcm_set";
|
||||
init.ops = &virt_prcm_set_ops;
|
||||
init.parent_names = &parent_name;
|
||||
|
|
@ -244,9 +244,12 @@ void omap2xxx_clkt_vps_init(void)
|
|||
hw->hw.init = &init;
|
||||
|
||||
clk = clk_register(NULL, &hw->hw);
|
||||
if (IS_ERR(clk)) {
|
||||
printk(KERN_ERR "Failed to register clock\n");
|
||||
kfree(hw);
|
||||
return;
|
||||
}
|
||||
|
||||
clkdev_create(clk, "cpufreq_ck", NULL);
|
||||
return;
|
||||
cleanup:
|
||||
kfree(hw);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -385,8 +385,7 @@ int omap_dss_reset(struct omap_hwmod *oh)
|
|||
}
|
||||
|
||||
for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
|
||||
if (oc->_clk)
|
||||
clk_prepare_enable(oc->_clk);
|
||||
clk_prepare_enable(oc->_clk);
|
||||
|
||||
dispc_disable_outputs();
|
||||
|
||||
|
|
@ -412,8 +411,7 @@ int omap_dss_reset(struct omap_hwmod *oh)
|
|||
pr_debug("dss_core: softreset done\n");
|
||||
|
||||
for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
|
||||
if (oc->_clk)
|
||||
clk_disable_unprepare(oc->_clk);
|
||||
clk_disable_unprepare(oc->_clk);
|
||||
|
||||
r = (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT : 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -334,10 +334,9 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
|
|||
struct omap_hwmod **hwmods;
|
||||
|
||||
od = kzalloc(sizeof(struct omap_device), GFP_KERNEL);
|
||||
if (!od) {
|
||||
ret = -ENOMEM;
|
||||
if (!od)
|
||||
goto oda_exit1;
|
||||
}
|
||||
|
||||
od->hwmods_cnt = oh_cnt;
|
||||
|
||||
hwmods = kmemdup(ohs, sizeof(struct omap_hwmod *) * oh_cnt, GFP_KERNEL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user