Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1714209

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

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH][net-next] net: hns3: ensure media_type is unitialized
Date 2017-08-17 19:10 +0200
Message-ID <ufwsV-7Rh-1@gated-at.bofh.it> (permalink)
References <ufoYr-2Kf-63@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Colin King <colin.king@canonical.com>
Date: Thu, 17 Aug 2017 10:01:07 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> 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, CID#1452624("Uninitialized scalar variable")
> 
> Fixes: 496d03e960ae ("net: hns3: Add Ethtool support to HNS3 driver")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH][net-next] net: hns3: ensure media_type is unitialized Colin King <colin.king@canonical.com> - 2017-08-17 11:10 +0200
  Re: [PATCH][net-next] net: hns3: ensure media_type is unitialized David Miller <davem@davemloft.net> - 2017-08-17 19:10 +0200

csiph-web