]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: venus: drop bogus probe deferrals
authorJohan Hovold <johan@kernel.org>
Fri, 17 Oct 2025 05:58:09 +0000 (07:58 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Thu, 6 Nov 2025 10:18:09 +0000 (11:18 +0100)
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 <johan@kernel.org>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/qcom/venus/vdec.c
drivers/media/platform/qcom/venus/venc.c

index bb0b4f6639c5fef2849658793befcc12bf14f15a..0597e11c4afa10e1c9ddf0d95f245260ce64c28f 100644 (file)
@@ -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);
 
index 8a89c01c5dbb5b377fc2f916a9e610036aa21c8f..98092a9f3cbf6919dacd9e58a1f265d9527d8f0e 100644 (file)
@@ -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);