]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: cec-funcs.h: cec_ops_report_features: set *dev_features to NULL
authorHans Verkuil <hverkuil@xs4all.nl>
Tue, 1 Aug 2017 11:53:30 +0000 (07:53 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 9 Aug 2017 13:36:13 +0000 (09:36 -0400)
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>
include/uapi/linux/cec-funcs.h

index c451eec42a83101a6eea0219788165600d128e49..270b251a3d9b5edf4f74fbc518a7e10756899116 100644 (file)
@@ -895,6 +895,7 @@ static inline void cec_ops_report_features(const struct cec_msg *msg,
        *cec_version = msg->msg[2];
        *all_device_types = msg->msg[3];
        *rc_profile = p;
+       *dev_features = NULL;
        while (p < &msg->msg[14] && (*p & CEC_OP_FEAT_EXT))
                p++;
        if (!(*p & CEC_OP_FEAT_EXT)) {