]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ethtool: check the return value of get_regs_len
authorYunsheng Lin <linyunsheng@huawei.com>
Wed, 26 Dec 2018 11:51:46 +0000 (19:51 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitf643c61bbd5dfe67c954c400c54dcd0cb8e030c5
treedad3a7472bfee6ee9cbed035c98299383680b38a
parent447a10b0dfe90e337318d0a51fbbc7048b532546
ethtool: check the return value of get_regs_len

BugLink: https://bugs.launchpad.net/bugs/1838700
commit f9fc54d313fab2834f44f516459cdc8ac91d797f upstream.

The return type for get_regs_len in struct ethtool_ops is int,
the hns3 driver may return error when failing to get the regs
len by sending cmd to firmware.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/core/ethtool.c