Skip to content

Commit c6b61d4

Browse files
Yang Yingliangbebarino
authored andcommitted
clk: en7523: fix wrong pointer check in en7523_clk_probe()
Check the real return value of devm_platform_ioremap_resource() in en7523_clk_probe(). Fixes: 1e62731 ("clk: en7523: Add clock driver for Airoha EN7523 SoC") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220426131539.388382-1-yangyingliang@huawei.com Acked-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 1e62731 commit c6b61d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/clk/clk-en7523.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ static int en7523_clk_probe(struct platform_device *pdev)
314314
return PTR_ERR(base);
315315

316316
np_base = devm_platform_ioremap_resource(pdev, 1);
317-
if (IS_ERR(base))
317+
if (IS_ERR(np_base))
318318
return PTR_ERR(np_base);
319319

320320
clk_data = devm_kzalloc(&pdev->dev,

0 commit comments

Comments
 (0)