Skip to content

Commit

Permalink
clk: qcom: cleanup some dev_err_probe() calls
Browse files Browse the repository at this point in the history
The dev_err_probe() function prints an error message if the error
code is not -EPROBE_DEFER.  If we know the error code in is -ENODEV
then there is no reason to check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YJotlJBJ1CVAgvMT@mwanda
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Dan Carpenter authored and Stephen Boyd committed Jun 1, 2021
1 parent 86881de commit 15abefd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/clk/qcom/apcs-sdx55.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ static int qcom_apcs_sdx55_clk_probe(struct platform_device *pdev)
int ret;

regmap = dev_get_regmap(parent, NULL);
if (!regmap)
return dev_err_probe(dev, -ENODEV, "Failed to get parent regmap\n");
if (!regmap) {
dev_err(dev, "Failed to get parent regmap\n");
return -ENODEV;
}

a7cc = devm_kzalloc(dev, sizeof(*a7cc), GFP_KERNEL);
if (!a7cc)
Expand Down

0 comments on commit 15abefd

Please sign in to comment.