[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190504.000001.652024295667504645.davem@davemloft.net>
Date: Sat, 04 May 2019 00:00:01 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: linux@...ck-us.net
Cc: linux-usb@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, garsilva@...eddedor.com
Subject: Re: [PATCH] usbnet: ipheth: Remove unnecessary NULL pointer check
From: Guenter Roeck <linux@...ck-us.net>
Date: Tue, 30 Apr 2019 17:35:33 -0700
> 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@...eddedor.com>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
Applied to net-next.
Powered by blists - more mailing lists