kernel_optimize_test/drivers/soc
Guenter Roeck 080f371d98 Revert "ASoC: mediatek: Check for error clk pointer"
This reverts commit d491a2c2cf which is
commit 9de2b9286a6dd16966959b3cb34fc2ddfd39213e upstream

With this patch in the tree, Chromebooks running the affected hardware
no longer boot. Bisect points to this patch, and reverting it fixes
the problem.

An analysis of the code with this patch applied shows:

        ret = init_clks(pdev, clk);
        if (ret)
                return ERR_PTR(ret);
...
                for (j = 0; j < MAX_CLKS && data->clk_id[j]; j++) {
                        struct clk *c = clk[data->clk_id[j]];

                        if (IS_ERR(c)) {
                                dev_err(&pdev->dev, "%s: clk unavailable\n",
                                        data->name);
                                return ERR_CAST(c);
                        }

                        scpd->clk[j] = c;
                }

Not all clocks in the clk_names array have to be present. Only the clocks
in the data->clk_id array are actually needed. The code already checks if
the required clocks are available and bails out if not. The assumption that
all clocks have to be present is wrong, and commit 9de2b9286a6d needs to be
reverted.

Fixes: 9de2b9286a6d ("ASoC: mediatek: Check for error clk pointer")
Cc: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Cc: Mark Brown <broonie@kernel.org>
Cc: James Liao <jamesjj.liao@mediatek.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com
Cc: Frank Wunderlich <frank-w@public-files.de>
Cc: Daniel Golle <daniel@makrotopia.org>
Link: https://lore.kernel.org/lkml/20220205014755.699603-1-linux@roeck-us.net/
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 18:30:36 +01:00
..
actions
amlogic
aspeed soc: aspeed: p2a-ctrl: Fix boundary check for mmap 2021-09-18 13:40:08 +02:00
atmel
bcm
dove
fsl soc: fsl: dpaa2-console: free buffer before returning from dpaa2_console_read 2021-11-18 14:04:24 +01:00
gemini
imx soc: imx: Register SoC device only on i.MX boards 2021-12-22 09:30:52 +01:00
ixp4xx soc: ixp4xx/qmgr: fix invalid __iomem access 2021-08-12 13:22:18 +02:00
kendryte
lantiq
mediatek Revert "ASoC: mediatek: Check for error clk pointer" 2022-02-08 18:30:36 +01:00
qcom PM: AVS: qcom-cpr: Use div64_ul instead of do_div 2022-01-27 10:54:17 +01:00
renesas
rockchip soc: rockchip: ROCKCHIP_GRF should not default to y, unconditionally 2021-09-15 09:50:31 +02:00
samsung soc: samsung: exynos-asv: handle reading revision register error 2021-03-04 11:38:32 +01:00
sifive
sunxi
tegra soc/tegra: fuse: Fix bitwise vs. logical OR warning 2021-12-22 09:30:54 +01:00
ti soc: ti: pruss: fix referenced node in error message 2022-01-27 10:54:12 +01:00
ux500
versatile
xilinx
zte
Kconfig
Makefile