On Fri Oct 17 07:58:09 2025 +0200, Johan Hovold wrote:
> The encoder and decoder platform devices are registered by the venus
> driver as children of the venus device, but even if someone were to mess
> this up no amount of probe deferring is going to conjure up a parent.
>
> Relatedly, the venus driver sets its driver data before registering the
> child devices and if this ever breaks we want to learn about it by
> failing probe.
>
> Signed-off-by: Johan Hovold <[email protected]>
> Reviewed-by: Vikash Garodia <[email protected]>
> Reviewed-by: Dikshita Agarwal <[email protected]>
> Reviewed-by: Bryan O'Donoghue <[email protected]>
> Signed-off-by: Bryan O'Donoghue <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/platform/qcom/venus/vdec.c | 5 +----
drivers/media/platform/qcom/venus/venc.c | 5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/drivers/media/platform/qcom/venus/vdec.c
b/drivers/media/platform/qcom/venus/vdec.c
index bb0b4f6639c5..0597e11c4afa 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -1776,12 +1776,9 @@ static int vdec_probe(struct platform_device *pdev)
struct venus_core *core;
int ret;
- if (!dev->parent)
- return -EPROBE_DEFER;
-
core = dev_get_drvdata(dev->parent);
if (!core)
- return -EPROBE_DEFER;
+ return -EINVAL;
platform_set_drvdata(pdev, core);
diff --git a/drivers/media/platform/qcom/venus/venc.c
b/drivers/media/platform/qcom/venus/venc.c
index 8a89c01c5dbb..98092a9f3cbf 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -1558,12 +1558,9 @@ static int venc_probe(struct platform_device *pdev)
struct venus_core *core;
int ret;
- if (!dev->parent)
- return -EPROBE_DEFER;
-
core = dev_get_drvdata(dev->parent);
if (!core)
- return -EPROBE_DEFER;
+ return -EINVAL;
platform_set_drvdata(pdev, core);
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]