Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
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: 5+ 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 ` [PATCH 2/2] net: phy: Fix race conditions " Kedareswara rao Appana
2016-08-19 13:24   ` Andrew Lunn
2016-08-19 13:15 ` Andrew Lunn [this message]
2016-08-19 13:18   ` [PATCH 1/2] net: phy: Add error checks " 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=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox