Skip to content

Commit 55c19ee

Browse files
Wei Yongjunbebarino
authored andcommitted
clk: qcom: msm8916: Fix return value check in qcom_apcs_msm8916_clk_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: 81ac388 ("clk: qcom: Add APCS clock controller support") Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 9903e41 commit 55c19ee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/clk/qcom/apcs-msm8916.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev)
4949
struct clk_regmap_mux_div *a53cc;
5050
struct regmap *regmap;
5151
struct clk_init_data init = { };
52-
int ret;
52+
int ret = -ENODEV;
5353

5454
regmap = dev_get_regmap(parent, NULL);
55-
if (IS_ERR(regmap)) {
56-
ret = PTR_ERR(regmap);
55+
if (!regmap) {
5756
dev_err(dev, "failed to get regmap: %d\n", ret);
5857
return ret;
5958
}

0 commit comments

Comments
 (0)