From b094301879063dd6697cd0dad146a5d142a9adfa Mon Sep 17 00:00:00 2001 From: rudy-07 Date: Mon, 30 Nov 2026 20:54:44 +0530 Subject: [PATCH] media: rp1-cfe: Fix oops on stream start error when FE is disabled In cfe_start_streaming(), the err_disable_cfe error path calls cfe_stop_channel(node, true) unconditionally. When the PiSP Front-End is not enabled, cfe->fe_csi2_channel is -1, so csi2_stop_channel() indexes CSI2_CH_CTRL(-1) and triggers a kernel paging fault. Pass is_fe_enabled(cfe) to cfe_stop_channel() instead, matching cfe_stop_streaming() and cfe_suspend(). Closes: https://github.com/raspberrypi/linux/issues/7398 Signed-off-by: rudy-07 --- drivers/media/platform/raspberrypi/rp1_cfe/cfe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c b/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c index 2b47bdc25eac88..0829370bfe0345 100644 --- a/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c +++ b/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c @@ -1193,7 +1193,7 @@ static int cfe_start_streaming(struct vb2_queue *vq, unsigned int count) err_disable_cfe: csi2_close_rx(&cfe->csi2); - cfe_stop_channel(node, true); + cfe_stop_channel(node, is_fe_enabled(cfe)); media_pipeline_stop(&node->pad); err_pm_put: pm_runtime_put(&cfe->pdev->dev);