Skip to content

Commit 89ef9c6

Browse files
krzkjic23
authored andcommitted
iio: adc: vf610: Simplify with dev_err_probe
Use dev_err_probe() to make error code handling simpler and handle deferred probe nicely (avoid spamming logs). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250713-iio-clk-get-enabled-v1-3-70abc1f9ce6c@linaro.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent a56e41a commit 89ef9c6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/iio/dac/vf610_dac.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,9 @@ static int vf610_dac_probe(struct platform_device *pdev)
189189
return PTR_ERR(info->regs);
190190

191191
info->clk = devm_clk_get(&pdev->dev, "dac");
192-
if (IS_ERR(info->clk)) {
193-
dev_err(&pdev->dev, "Failed getting clock, err = %ld\n",
194-
PTR_ERR(info->clk));
195-
return PTR_ERR(info->clk);
196-
}
192+
if (IS_ERR(info->clk))
193+
return dev_err_probe(&pdev->dev, PTR_ERR(info->clk),
194+
"Failed getting clock\n");
197195

198196
platform_set_drvdata(pdev, indio_dev);
199197

0 commit comments

Comments
 (0)