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] [day] [month] [year] [list]
Message-ID: <CO1PR11MB50890C2657DBCEB94CCFB826D6802@CO1PR11MB5089.namprd11.prod.outlook.com>
Date: Thu, 15 Aug 2024 23:40:06 +0000
From: "Keller, Jacob E" <jacob.e.keller@...el.com>
To: "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>, "Polchlopek, Mateusz"
	<mateusz.polchlopek@...el.com>, "intel-wired-lan@...ts.osuosl.org"
	<intel-wired-lan@...ts.osuosl.org>, "Lobakin, Aleksander"
	<aleksander.lobakin@...el.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Drewek, Wojciech"
	<wojciech.drewek@...el.com>, Sai Krishna <saikrishnag@...vell.com>, "Simon
 Horman" <horms@...nel.org>, "Zaki, Ahmed" <ahmed.zaki@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v9 06/14] iavf: add initial
 framework for registering PTP clock



> -----Original Message-----
> From: Nguyen, Anthony L <anthony.l.nguyen@...el.com>
> Sent: Thursday, August 15, 2024 3:17 PM
> To: Polchlopek, Mateusz <mateusz.polchlopek@...el.com>; intel-wired-
> lan@...ts.osuosl.org; Lobakin, Aleksander <aleksander.lobakin@...el.com>
> Cc: netdev@...r.kernel.org; Keller, Jacob E <jacob.e.keller@...el.com>; Drewek,
> Wojciech <wojciech.drewek@...el.com>; Sai Krishna <saikrishnag@...vell.com>;
> Simon Horman <horms@...nel.org>; Zaki, Ahmed <ahmed.zaki@...el.com>
> Subject: Re: [Intel-wired-lan] [PATCH iwl-next v9 06/14] iavf: add initial framework
> for registering PTP clock
> 
> 
> 
> On 8/13/2024 5:55 AM, Mateusz Polchlopek wrote:
> > From: Jacob Keller <jacob.e.keller@...el.com>
> 
> ...
> 
> > diff --git a/drivers/net/ethernet/intel/iavf/iavf_ptp.c
> b/drivers/net/ethernet/intel/iavf/iavf_ptp.c
> 
> ...
> 
> > +static int iavf_ptp_register_clock(struct iavf_adapter *adapter)
> > +{
> > +	struct ptp_clock_info *ptp_info = &adapter->ptp.info;
> > +	struct device *dev = &adapter->pdev->dev;
> > +
> > +	memset(ptp_info, 0, sizeof(*ptp_info));
> > +
> > +	snprintf(ptp_info->name, sizeof(ptp_info->name), "%s-%s-clk",
> > +		 dev_driver_string(dev), dev_name(dev));
> > +	ptp_info->owner = THIS_MODULE;
> > +
> > +	adapter->ptp.clock = ptp_clock_register(ptp_info, dev);
> > +	if (IS_ERR(adapter->ptp.clock)) {
> > +		adapter->ptp.clock = NULL;
> > +
> > +		return PTR_ERR(adapter->ptp.clock);
> > +	}
> 
> cocci reports:
> +drivers/net/ethernet/intel/iavf/iavf_ptp.c:47:9-16: ERROR: PTR_ERR
> applied after initialization to constant on line 45

Ya, shouldn't this be returning the original error value like:

err = PTR_ERR(adapter->ptp.clock);
adapter->ptp.clock = NULL
return err;

or something along those lines.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ