mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
8c405cdccc
The patches were generated from the RPi repo with the following command: git format-patch v6.6.34..rpi-6.1.y Some patches needed rebasing and, as usual, the applied and reverted, wireless drivers, Github workflows, READMEs and defconfigs patches were removed. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
From f604d813cb020d470d1a34e3a2e0c3ea5810cf9f Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
Date: Thu, 21 Dec 2023 17:59:15 +0000
|
|
Subject: [PATCH 0812/1085] media: rp1: cfe: Fix error paths in
|
|
cfe_start_streaming
|
|
|
|
Noted that if we get "node link is not enabled", then we also
|
|
get the videobuf2 splat for the driver not cleaning up correctly
|
|
on a failed start_streaming, and indeed we weren't returning the
|
|
buffers.
|
|
|
|
Checking the other error paths, noted that the "FE enabled, but
|
|
FE_CONFIG node is not" path was not calling pm_runtime_put.
|
|
|
|
Fix both paths.
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
---
|
|
drivers/media/platform/raspberrypi/rp1_cfe/cfe.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c
|
|
+++ b/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c
|
|
@@ -1112,7 +1112,8 @@ static int cfe_start_streaming(struct vb
|
|
if (!check_state(cfe, NODE_ENABLED, node->id)) {
|
|
cfe_err("%s node link is not enabled.\n",
|
|
node_desc[node->id].name);
|
|
- return -EINVAL;
|
|
+ ret = -EINVAL;
|
|
+ goto err_streaming;
|
|
}
|
|
|
|
ret = pm_runtime_resume_and_get(&cfe->pdev->dev);
|
|
@@ -1126,7 +1127,7 @@ static int cfe_start_streaming(struct vb
|
|
!check_state(cfe, NODE_ENABLED, cfe->node[FE_CONFIG].id)) {
|
|
cfe_err("FE enabled, but FE_CONFIG node is not\n");
|
|
ret = -EINVAL;
|
|
- goto err_streaming;
|
|
+ goto err_pm_put;
|
|
}
|
|
|
|
ret = media_pipeline_start(&node->pad, &cfe->pipe);
|