summaryrefslogtreecommitdiffstats
path: root/drivers/media/cec/platform
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-09-19 17:58:43 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2022-12-07 17:58:46 +0100
commit6cb7d1b3ff83e98e852db9739892c4643a31804b (patch)
treee486702b24c8151f4cf8b057047032429cec53f3 /drivers/media/cec/platform
parentheaders: Remove some left-over license text in include/uapi/linux/v4l2-* (diff)
downloadlinux-6cb7d1b3ff83e98e852db9739892c4643a31804b.tar.xz
linux-6cb7d1b3ff83e98e852db9739892c4643a31804b.zip
media: Switch to use dev_err_probe() helper
In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER. Reviewed-by: Sean Young <sean@mess.org> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/cec/platform')
-rw-r--r--drivers/media/cec/platform/stm32/stm32-cec.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/cec/platform/stm32/stm32-cec.c b/drivers/media/cec/platform/stm32/stm32-cec.c
index 40db7911b437..7b2db46a5722 100644
--- a/drivers/media/cec/platform/stm32/stm32-cec.c
+++ b/drivers/media/cec/platform/stm32/stm32-cec.c
@@ -288,12 +288,9 @@ static int stm32_cec_probe(struct platform_device *pdev)
return ret;
cec->clk_cec = devm_clk_get(&pdev->dev, "cec");
- if (IS_ERR(cec->clk_cec)) {
- if (PTR_ERR(cec->clk_cec) != -EPROBE_DEFER)
- dev_err(&pdev->dev, "Cannot get cec clock\n");
-
- return PTR_ERR(cec->clk_cec);
- }
+ if (IS_ERR(cec->clk_cec))
+ return dev_err_probe(&pdev->dev, PTR_ERR(cec->clk_cec),
+ "Cannot get cec clock\n");
ret = clk_prepare(cec->clk_cec);
if (ret) {