]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: ivsc: csi: don't count privacy on as error
authorWentong Wu <wentong.wu@intel.com>
Fri, 7 Jun 2024 13:25:45 +0000 (21:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Aug 2024 07:00:40 +0000 (09:00 +0200)
commit a813f168336ec4ef725b836e598cd9dc14f76dd7 upstream.

Prior to the ongoing command privacy is on, it would return -1 to
indicate the current privacy status, and the ongoing command would
be well executed by firmware as well, so this is not error. This
patch changes its behavior to notify privacy on directly by V4L2
privacy control instead of reporting error.

Fixes: 29006e196a56 ("media: pci: intel: ivsc: Add CSI submodule")
Cc: stable@vger.kernel.org # for 6.6 and later
Reported-by: Hao Yao <hao.yao@intel.com>
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Tested-by: Jason Chen <jason.z.chen@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/pci/intel/ivsc/mei_csi.c

index c6d8f72e4eec597a6ca44d87366498e96c5f311a..16791a7f4f157e56283c26335e3785d0c21e9cae 100644 (file)
@@ -192,7 +192,11 @@ static int mei_csi_send(struct mei_csi *csi, u8 *buf, size_t len)
 
        /* command response status */
        ret = csi->cmd_response.status;
-       if (ret) {
+       if (ret == -1) {
+               /* notify privacy on instead of reporting error */
+               ret = 0;
+               v4l2_ctrl_s_ctrl(csi->privacy_ctrl, 1);
+       } else if (ret) {
                ret = -EINVAL;
                goto out;
        }