Skip to content

Commit dbb988b

Browse files
Wei Yongjunbebarino
authored andcommitted
clk: qcom: Fix return value check in apss_ipq6018_probe()
In case of error, the function dev_get_regmap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 5e77b4e ("clk: qcom: Add ipq6018 apss clock controller") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 5939028 commit dbb988b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/clk/qcom/apss-ipq6018.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ static int apss_ipq6018_probe(struct platform_device *pdev)
8787
struct regmap *regmap;
8888

8989
regmap = dev_get_regmap(pdev->dev.parent, NULL);
90-
if (IS_ERR(regmap))
91-
return PTR_ERR(regmap);
90+
if (!regmap)
91+
return -ENODEV;
9292

9393
return qcom_cc_really_probe(pdev, &apss_ipq6018_desc, regmap);
9494
}

0 commit comments

Comments
 (0)