Re: [PATCH] usbnet: ipheth: Remove unnecessary NULL pointer check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Guenter Roeck <linux@xxxxxxxxxxxx>
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@xxxxxxxxxxxxxx>
> Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>

Applied to net-next.



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux