All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Kedareswara rao Appana <appana.durga.rao@xilinx.com>
Cc: michal.simek@xilinx.com, soren.brinkmann@xilinx.com,
	appanad@xilinx.com, f.fainelli@gmail.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] net: phy: Add error checks in the driver
Date: Fri, 19 Aug 2016 15:15:17 +0200	[thread overview]
Message-ID: <20160819131517.GB7343@lunn.ch> (raw)
In-Reply-To: <1471610891-13353-1-git-send-email-appanad@xilinx.com>

> -	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);

WARNING: multiple messages have this Message-ID (diff)
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] net: phy: Add error checks in the driver
Date: Fri, 19 Aug 2016 15:15:17 +0200	[thread overview]
Message-ID: <20160819131517.GB7343@lunn.ch> (raw)
In-Reply-To: <1471610891-13353-1-git-send-email-appanad@xilinx.com>

> -	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);

  parent reply	other threads:[~2016-08-19 13:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19 12:48 [PATCH 1/2] net: phy: Add error checks in the driver Kedareswara rao Appana
2016-08-19 12:48 ` Kedareswara rao Appana
2016-08-19 12:48 ` [PATCH 2/2] net: phy: Fix race conditions " Kedareswara rao Appana
2016-08-19 12:48   ` Kedareswara rao Appana
2016-08-19 13:24   ` Andrew Lunn
2016-08-19 13:24     ` Andrew Lunn
2016-08-19 13:15 ` Andrew Lunn [this message]
2016-08-19 13:15   ` [PATCH 1/2] net: phy: Add error checks " Andrew Lunn
2016-08-19 13:18   ` Appana Durga Kedareswara Rao
2016-08-19 13:18     ` Appana Durga Kedareswara Rao
2016-08-19 13:18     ` Appana Durga Kedareswara Rao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160819131517.GB7343@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=appana.durga.rao@xilinx.com \
    --cc=appanad@xilinx.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=soren.brinkmann@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.