[media] pulse8-cec: avoid uninitialized data use
authorArnd Bergmann <arnd@arndb.de>
Mon, 12 Sep 2016 08:43:49 +0000 (05:43 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 19 Sep 2016 17:16:11 +0000 (14:16 -0300)
commitb82e39f85603db6251ffcacf8b0b91674869c6fb
treec6ae1c2f56f7cb7bbad07e9905d1198b234ed997
parent4540e0ad6fa6fab0e4cc0dc4f74b1ebb676a4404
[media] pulse8-cec: avoid uninitialized data use

Building with -Wmaybe-uninitialized reveals the use on an uninitialized
variable containing the physical address of the device whenever
firmware before version 2 is used:

drivers/staging/media/pulse8-cec/pulse8-cec.c: In function 'pulse8_connect':
drivers/staging/media/pulse8-cec/pulse8-cec.c:447:2: error: 'pa' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This sets the address to CEC_PHYS_ADDR_INVALID in this case, so we don't
try to write back the uninitialized data to the device.

Fixes: e28a6c8b3fcc ("[media] pulse8-cec: sync configuration with adapter")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/pulse8-cec/pulse8-cec.c