diff options
author | Guenter Roeck <linux@roeck-us.net> | 2019-05-01 03:35:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-04 06:59:31 +0300 |
commit | e28441e2ea090a4751160a75e5b0d823116a92fb (patch) | |
tree | eb40b757695b7beb6bca8d2c24996decff03b936 /drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | |
parent | a27415decd84dac124c6185f1184b6c779d0a5ab (diff) | |
download | linux-e28441e2ea090a4751160a75e5b0d823116a92fb.tar.xz |
usbnet: ipheth: Remove unnecessary NULL pointer check
ipheth_carrier_set() is called from two locations. In
ipheth_carrier_check_work(), its parameter 'dev' is set with
container_of(work, ...) and can not be NULL. In ipheth_open(),
dev is extracted from netdev_priv(net) and dereferenced before
the call to ipheth_carrier_set(). The NULL pointer check of dev
in ipheth_carrier_set() is therefore unnecessary and can be removed.
Cc: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c')
0 files changed, 0 insertions, 0 deletions