Re: [PATCH][net-next] net: hns3: ensure media_type is unitialized

2017-08-17 Thread David Miller
From: Colin King Date: Thu, 17 Aug 2017 10:01:07 +0100 > From: Colin Ian King > > Media type is only set if h->ae_algo->ops->get_media_type is called > so there is a possibility that media_type is uninitialized when it is > used a switch

Re: [PATCH][net-next] net: hns3: ensure media_type is unitialized

2017-08-17 Thread David Miller
From: Colin King Date: Thu, 17 Aug 2017 10:01:07 +0100 > From: Colin Ian King > > Media type is only set if h->ae_algo->ops->get_media_type is called > so there is a possibility that media_type is uninitialized when it is > used a switch statement. Fix this by initializing media_type to >

[PATCH][net-next] net: hns3: ensure media_type is unitialized

2017-08-17 Thread Colin King
From: Colin Ian King Media type is only set if h->ae_algo->ops->get_media_type is called so there is a possibility that media_type is uninitialized when it is used a switch statement. Fix this by initializing media_type to HNAE3_MEDIA_TYPE_UNKNOWN. Detected by

[PATCH][net-next] net: hns3: ensure media_type is unitialized

2017-08-17 Thread Colin King
From: Colin Ian King Media type is only set if h->ae_algo->ops->get_media_type is called so there is a possibility that media_type is uninitialized when it is used a switch statement. Fix this by initializing media_type to HNAE3_MEDIA_TYPE_UNKNOWN. Detected by CoverityScan,