]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
hinic: fix dereference of pointer hwdev before it is null checked
authorColin Ian King <colin.king@canonical.com>
Thu, 20 Jun 2019 13:27:51 +0000 (14:27 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Jun 2019 00:08:49 +0000 (17:08 -0700)
commit137e4e1ab7b3145364b01d2a260ca46672765865
tree6c90add341e635693f8af460537639d9025c2e99
parent969b15b002628ca4bb7fa4ee9c2e07bc545d0477
hinic: fix dereference of pointer hwdev before it is null checked

Currently pointer hwdev is dereferenced when assigning hwif before
hwdev is null checked.  Fix this by only derefencing hwdev after the
null check.

Addresses-Coverity: ("Dereference before null check")
Fixes: 4fdc51bb4e92 ("hinic: add support for rss parameters with ethtool")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/huawei/hinic/hinic_port.c