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]
Message-ID: <20160819131517.GB7343@lunn.ch>
Date:   Fri, 19 Aug 2016 15:15:17 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Kedareswara rao Appana <appana.durga.rao@...inx.com>
Cc:     michal.simek@...inx.com, soren.brinkmann@...inx.com,
        appanad@...inx.com, f.fainelli@...il.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] net: phy: Add error checks in the driver

> -	mdiobus_write(phydev->mdio.bus, priv->addr, XILINX_GMII2RGMII_REG, val);
> +	err = mdiobus_write(phydev->mdio.bus, priv->addr, XILINX_GMII2RGMII_REG,
> +			    val);
> +	if (err < 0)
> +		return err;
>  
>  	return 0;

Do you need to assign err? Why not just

   return mdiobus_write(phydev->mdio.bus, priv->addr, XILINX_GMII2RGMII_REG,
			val);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ