Skip to content

Commit

Permalink
clk: en7523: fix wrong pointer check in en7523_clk_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yang Yingliang authored and Stephen Boyd committed Apr 26, 2022
1 parent 1e62731 commit c6b61d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/clk-en7523.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ static int en7523_clk_probe(struct platform_device *pdev)
return PTR_ERR(base);

np_base = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(base))
if (IS_ERR(np_base))
return PTR_ERR(np_base);

clk_data = devm_kzalloc(&pdev->dev,
Expand Down

0 comments on commit c6b61d4

Please sign in to comment.