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.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -895,6 +895,7 @@ static inline void cec_ops_report_features(const struct cec_msg *msg, · 894 unmodified lines | |||
| 895 | *cec_version = msg->msg[2]; | 895 | *cec_version = msg->msg[2]; |
| 896 | *all_device_types = msg->msg[3]; | 896 | *all_device_types = msg->msg[3]; |
| 897 | *rc_profile = p; | 897 | *rc_profile = p; |
| 898 | *dev_features = NULL; | ||
| 898 | while (p < &msg->msg[14] && (*p & CEC_OP_FEAT_EXT)) | 899 | while (p < &msg->msg[14] && (*p & CEC_OP_FEAT_EXT)) |
| 899 | p++; | 900 | p++; |
| 900 | if (!(*p & CEC_OP_FEAT_EXT)) { | 901 | if (!(*p & CEC_OP_FEAT_EXT)) { |