Skip to content

Commit 79bcd34

Browse files
Hans Verkuilmchehab
authored andcommitted
media: cec-funcs.h: cec_ops_report_features: set *dev_features to NULL
gcc can get confused by this code and it thinks dev_features can be returned uninitialized. So initialize to NULL at the beginning to shut up the warning. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
1 parent 079c6ea commit 79bcd34

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎include/uapi/linux/cec-funcs.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,7 @@ static inline void cec_ops_report_features(const struct cec_msg *msg,
895895
*cec_version = msg->msg[2];
896896
*all_device_types = msg->msg[3];
897897
*rc_profile = p;
898+
*dev_features = NULL;
898899
while (p < &msg->msg[14] && (*p & CEC_OP_FEAT_EXT))
899900
p++;
900901
if (!(*p & CEC_OP_FEAT_EXT)) {

0 commit comments

Comments
 (0)