MLK-20192-3: m2m: Coverity: fix overwriting to previous value
authorGuoniu.Zhou <guoniu.zhou@nxp.com>
Thu, 20 Dec 2018 02:45:32 +0000 (10:45 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
fix overwriting to previous value

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
drivers/media/platform/imx8/mxc-isi-hw.c

index 1e56080..a2c5c18 100644 (file)
@@ -759,7 +759,7 @@ void mxc_isi_m2m_config_src(struct mxc_isi_dev *mxc_isi)
        /* source format */
        val = readl(mxc_isi->regs + CHNL_MEM_RD_CTRL);
        val &= ~CHNL_MEM_RD_CTRL_IMG_TYPE_MASK;
-       val = src_f->fmt->color << CHNL_MEM_RD_CTRL_IMG_TYPE_OFFSET;
+       val |= src_f->fmt->color << CHNL_MEM_RD_CTRL_IMG_TYPE_OFFSET;
        writel(val, mxc_isi->regs + CHNL_MEM_RD_CTRL);
 
        /* source image width and height */