Skip to content

Commit 3dc265b

Browse files
AngeloGioacchino Del Regnobebarino
authored andcommitted
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: 41138fb ("clk: mediatek: mt8173: Migrate to platform driver and common probe") Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Chen-Yu Tsai <[email protected]> Reviewed-by: Markus Schneider-Pargmann <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 5182176 commit 3dc265b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/mediatek/clk-mt8173-apmixedsys.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static int clk_mt8173_apmixed_probe(struct platform_device *pdev)
148148

149149
base = of_iomap(node, 0);
150150
if (!base)
151-
return PTR_ERR(base);
151+
return -ENOMEM;
152152

153153
clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK);
154154
if (IS_ERR_OR_NULL(clk_data))

0 commit comments

Comments
 (0)