lkml.org 
[lkml]   [2017]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH][net-next] net: hns3: ensure media_type is unitialized
From
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.

\
 
 \ /
  Last update: 2017-08-17 19:07    [W:0.028 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site