lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 22 May 2019 03:08:52 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Richard Cochran <richardcochran@...il.com>
Cc:     netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
        devicetree@...r.kernel.org,
        Florian Fainelli <f.fainelli@...il.com>,
        Jacob Keller <jacob.e.keller@...el.com>,
        Mark Rutland <mark.rutland@....com>,
        Miroslav Lichvar <mlichvar@...hat.com>,
        Rob Herring <robh+dt@...nel.org>,
        Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH V3 net-next 3/6] net: Add a layer for non-PHY MII time
 stamping drivers.

> +struct mii_timestamper *register_mii_timestamper(struct device_node *node,
> +						 unsigned int port)
> +{
> +	struct mii_timestamper *mii_ts = NULL;
> +	struct mii_timestamping_desc *desc;
> +	struct list_head *this;
> +
> +	mutex_lock(&tstamping_devices_lock);
> +	list_for_each(this, &mii_timestamping_devices) {
> +		desc = list_entry(this, struct mii_timestamping_desc, list);
> +		if (desc->device->of_node == node) {
> +			mii_ts = desc->ctrl->probe_channel(desc->device, port);
> +			if (mii_ts) {
> +				mii_ts->device = desc->device;
> +				get_device(desc->device);

> + * @probe_channel:	Callback into the controller driver announcing the
> + *			presence of the 'port' channel.  The 'device' field
> + *			had been passed to register_mii_tstamp_controller().
> + *			The driver must return either a pointer to a valid
> + *			MII timestamper instance or PTR_ERR.

Hi Richard

probe_channel returns an PTR_ERR. So if (mii_ts) should probably be
if (IS_ERR(mii_ts))

   Andrew

Powered by blists - more mailing lists