From: Kevin Hao <kexin....@windriver.com>

The struct v4l2_input::name is an array, so the checking of
(mxc_capture_inputs[cam->current_input].name != NULL) always return
true. The issue was introduced by commit 5b1aeb69cf15 ("media: capture:
add mxc v4l2 capture driver").

Signed-off-by: Kevin Hao <kexin....@windriver.com>
---
Hi Bruce,

Please help me merge this into the following two branches:
  v5.15/standard/nxp-sdk-5.15/nxp-soc
  v5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-soc

 drivers/media/platform/mxc/capture/mxc_v4l2_capture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c 
b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c
index e768cd443e7e..b836027fe12c 100644
--- a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c
+++ b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c
@@ -495,7 +495,7 @@ static int mxc_streamoff(cam_data *cam)
         * 3. disable idmac
         * 4. disable smfc (CSI--MEM channel)
         */
-       if (mxc_capture_inputs[cam->current_input].name != NULL) {
+       if (mxc_capture_inputs[cam->current_input].name[0]) {
                if (cam->enc_disable_csi) {
                        err = cam->enc_disable_csi(cam);
                        if (err != 0)
-- 
2.44.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13842): 
https://lists.yoctoproject.org/g/linux-yocto/message/13842
Mute This Topic: https://lists.yoctoproject.org/mt/105631195/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to