Commit 3dc265b3 authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno Committed by Stephen Boyd

clk: mediatek: clk-mt8173-apmixedsys: Fix return value for of_iomap() error

The of_iomap() function returns NULL in case of error so usage of
PTR_ERR() is wrong!
Change that to return -ENOMEM in case of failure.

Fixes: 41138fbf ("clk: mediatek: mt8173: Migrate to platform driver and common probe")
Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230615122051.546985-3-angelogioacchino.delregno@collabora.comReviewed-by: default avatarChen-Yu Tsai <wenst@chromium.org>
Reviewed-by: default avatarMarkus Schneider-Pargmann <msp@baylibre.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 51821765
......@@ -148,7 +148,7 @@ static int clk_mt8173_apmixed_probe(struct platform_device *pdev)
base = of_iomap(node, 0);
if (!base)
return PTR_ERR(base);
return -ENOMEM;
clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK);
if (IS_ERR_OR_NULL(clk_data))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment