Skip to contentSkip to conversation

Patch "media: camss-vfe: always initialize reg at vfe_set_xbar_cfg()" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Dec 18, 2017

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

media: camss-vfe: always initialize reg at vfe_set_xbar_cfg()

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
media-camss-vfe-always-initialize-reg-at-vfe_set_xbar_cfg.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Mon Dec 18 13:28:59 CET 2017

From: Mauro Carvalho Chehab <[email protected]>
Date: Wed, 1 Nov 2017 08:09:59 -0400
Subject: media: camss-vfe: always initialize reg at vfe_set_xbar_cfg()

From: Mauro Carvalho Chehab <[email protected]>

[ Upstream commit 9917fbcfa20ab987d6381fd0365665e5c1402d75 ]

if output->wm_num is bigger than 2, the value for reg is
not initialized, as warned by smatch:
drivers/media/platform/qcom/camss-8x16/camss-vfe.c:633 vfe_set_xbar_cfg() error: uninitialized symbol 'reg'. drivers/media/platform/qcom/camss-8x16/camss-vfe.c:637 vfe_set_xbar_cfg() error: uninitialized symbol 'reg'.

That shouldn't happen in practice, so add a logic that will break the loop if i > 1, fixing the warnings.

---
 drivers/media/platform/qcom/camss-8x16/camss-vfe.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/media/platform/qcom/camss-8x16/camss-vfe.c +3 -0
@@ -622,6 +622,9 @@ static void vfe_set_xbar_cfg(struct vfe_
 			reg = VFE_0_BUS_XBAR_CFG_x_M_PAIR_STREAM_EN;
 			if (p == V4L2_PIX_FMT_NV12 || p == V4L2_PIX_FMT_NV16)
 				reg |= VFE_0_BUS_XBAR_CFG_x_M_PAIR_STREAM_SWAP_INTER_INTRA;
+		} else {
+			/* On current devices output->wm_num is always <= 2 */
+			break;
 		}
 
 		if (output->wm_idx[i] % 2 == 1)

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/media-usbtv-fix-brightness-and-contrast-controls.patch queue-4.14/media-camss-vfe-always-initialize-reg-at-vfe_set_xbar_cfg.patch