Skip to contentSkip to conversation

media: venus: drop bogus probe deferrals

PATCH In review Johan Hovold 4 participants 4 messages Oct 17, 2025 – Oct 28, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: venus: drop bogus probe deferrals

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.

---
 drivers/media/platform/qcom/venus/vdec.c | 5 +----
 drivers/media/platform/qcom/venus/venc.c | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)
drivers/media/platform/qcom/venus/vdec.c +1 -4
index 55c27345b7d8..2d822ad86dce 100644
@@ -1778,12 +1778,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);
 
drivers/media/platform/qcom/venus/venc.c +1 -4
index fba07557a399..f1abd2bdce6b 100644
@@ -1560,12 +1560,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);
 
Signature · 1 line
2.49.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 51 lines · Johan Hovold

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.

---
  drivers/media/platform/qcom/venus/vdec.c | 5 +----
  drivers/media/platform/qcom/venus/venc.c | 5 +----
  2 files changed, 2 insertions(+), 8 deletions(-)
drivers/media/platform/qcom/venus/vdec.c +1 -4
index 55c27345b7d8..2d822ad86dce 100644
@@ -1778,12 +1778,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);
 
drivers/media/platform/qcom/venus/venc.c +1 -5
index fba07557a399..f1abd2bdce6b 100644
@@ -1560,12 +1560,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);
 
--
Quoted 2 lines

2.49.1

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Johan Hovold
Quoted 40 lines · Johan Hovold

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.

---
 drivers/media/platform/qcom/venus/vdec.c | 5 +----
 drivers/media/platform/qcom/venus/venc.c | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)
drivers/media/platform/qcom/venus/vdec.c +1 -4
index 55c27345b7d8..2d822ad86dce 100644
@@ -1778,12 +1778,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);
 
drivers/media/platform/qcom/venus/venc.c +0 -0
index fba07557a399..f1abd2bdce6b 100644
@@ -1560,12 +1560,9 @@ static int venc_probe(struct platform_device *pdev)
 	struct venus_core *core;
 	int ret;
 

drivers/media/platform/qcom/venus/venc.c static int venc_probe(struct platform_device *pdev) · line 1568

Quoted 10 lines
drivers/media/platform/qcom/venus/venc.c +1 -4
-	if (!dev->parent)
-		return -EPROBE_DEFER;
-
 	core = dev_get_drvdata(dev->parent);
 	if (!core)
-		return -EPROBE_DEFER;
+		return -EINVAL;
 
 	platform_set_drvdata(pdev, core);
 

Thanks,
Dikshita

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Johan Hovold
Quoted 9 lines · Johan Hovold

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.