summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2017-08-31 04:12:53 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-09-23 14:59:44 -0400
commit9267d90c564fc4ac7e51b922fa03107bb8c78739 (patch)
treefb5ee473acecc359fa19f3ecce3ea25808a36d05 /include/media
parent561b29e4ec8d0aac7e094f70d649ee4abccdda03 (diff)
media: cec.h: initialize *parent and *port in cec_phys_addr_validate
Make sure these values are set to avoid 'uninitialized variable' warnings. Hasn't happened yet, but better safe than sorry. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/cec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/media/cec.h b/include/media/cec.h
index 9d0f983faea9..16341210d3ba 100644
--- a/include/media/cec.h
+++ b/include/media/cec.h
@@ -427,6 +427,10 @@ static inline u16 cec_phys_addr_for_input(u16 phys_addr, u8 input)
static inline int cec_phys_addr_validate(u16 phys_addr, u16 *parent, u16 *port)
{
+ if (parent)
+ *parent = phys_addr;
+ if (port)
+ *port = 0;
return 0;
}