Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e28441e2 authored by Guenter Roeck's avatar Guenter Roeck Committed by David S. Miller
Browse files

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: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a27415de
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;