media: include/media: fix missing | operator when setting cfg
authorColin Ian King <colin.king@canonical.com>
Wed, 18 Apr 2018 15:06:17 +0000 (11:06 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Sat, 5 May 2018 13:01:22 +0000 (09:01 -0400)
The value from a readl is being masked with ITE_REG_CIOCAN_MASK however
this is not being used and cfg is being re-assigned.  I believe the
assignment operator should actually be instead the |= operator.

Detected by CoverityScan, CID#1467987 ("Unused value")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/exynos4-is/fimc-lite-reg.c

index f0acc550d065816cb5693a28d50bed0dc83da6a3..16565a0b4bf1ae2730511eb7920c5b906ae86161 100644 (file)
@@ -254,7 +254,7 @@ void flite_hw_set_dma_window(struct fimc_lite *dev, struct flite_frame *f)
        /* Maximum output pixel size */
        cfg = readl(dev->regs + FLITE_REG_CIOCAN);
        cfg &= ~FLITE_REG_CIOCAN_MASK;
-       cfg = (f->f_height << 16) | f->f_width;
+       cfg |= (f->f_height << 16) | f->f_width;
        writel(cfg, dev->regs + FLITE_REG_CIOCAN);
 
        /* DMA offsets */