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]
Date:   Fri, 29 Apr 2022 04:52:08 +0000
From:   Radhey Shyam Pandey <radheys@...inx.com>
To:     Andrew Lunn <andrew@...n.ch>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        Michal Simek <michals@...inx.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        git <git@...inx.com>, Shravya Kumbham <shravyak@...inx.com>
Subject: RE: [PATCH 2/2] net: emaclite: Add error handling for
 of_address_to_resource()

> -----Original Message-----
> From: Andrew Lunn <andrew@...n.ch>
> Sent: Friday, April 29, 2022 6:48 AM
> To: Radhey Shyam Pandey <radheys@...inx.com>
> Cc: davem@...emloft.net; kuba@...nel.org; pabeni@...hat.com; Michal
> Simek <michals@...inx.com>; netdev@...r.kernel.org; linux-arm-
> kernel@...ts.infradead.org; linux-kernel@...r.kernel.org; git <git@...inx.com>;
> Shravya Kumbham <shravyak@...inx.com>
> Subject: Re: [PATCH 2/2] net: emaclite: Add error handling for
> of_address_to_resource()
> 
> On Thu, Apr 28, 2022 at 09:57:58PM +0530, Radhey Shyam Pandey wrote:
> > From: Shravya Kumbham <shravya.kumbham@...inx.com>
> >
> > check the return value of of_address_to_resource() and also add
> > missing of_node_put() for np and npp nodes.
> >
> > Addresses-Coverity: Event check_return value.
> > Signed-off-by: Shravya Kumbham <shravya.kumbham@...inx.com>
> > Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
> > ---
> >  drivers/net/ethernet/xilinx/xilinx_emaclite.c |   15 ++++++++++++---
> >  1 files changed, 12 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> > index f9cf86e..c281423 100644
> > --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> > +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
> > @@ -803,7 +803,7 @@ static int xemaclite_mdio_write(struct mii_bus *bus,
> int phy_id, int reg,
> >  static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev)
> >  {
> >  	struct mii_bus *bus;
> > -	int rc;
> > +	int rc, ret;
> >  	struct resource res;
> >  	struct device_node *np = of_get_parent(lp->phy_node);
> >  	struct device_node *npp;
> 
> Reverse Chritmas tree is messed up here, but you could make it a bet
> less messed up by moving rc, ret further down.

Thanks, I will fix the existing declaration order in a new patch.
and in this patch will align new changes to reverse Christmas tree 
order.

> 
>      Andrew

Powered by blists - more mailing lists