diff options
author | Guenter Roeck <linux@roeck-us.net> | 2019-05-01 02:35:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-04 05:59:31 +0200 |
commit | e28441e2ea090a4751160a75e5b0d823116a92fb (patch) | |
tree | eb40b757695b7beb6bca8d2c24996decff03b936 /drivers/net/usb | |
parent | net: dsa: mv88e6xxx: Pass interrupt number in platform data (diff) | |
download | linux-e28441e2ea090a4751160a75e5b0d823116a92fb.tar.xz linux-e28441e2ea090a4751160a75e5b0d823116a92fb.zip |
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/usb')
-rw-r--r-- | drivers/net/usb/ipheth.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c index a01a71a7e48d..c247aed2dceb 100644 --- a/drivers/net/usb/ipheth.c +++ b/drivers/net/usb/ipheth.c @@ -241,8 +241,6 @@ static int ipheth_carrier_set(struct ipheth_device *dev) struct usb_device *udev; int retval; - if (!dev) - return 0; if (!dev->confirmed_pairing) return 0; |