linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <pza@pengutronix.de>
To: Nava kishore Manne <nava.manne@xilinx.com>
Cc: robh+dt@kernel.org, mark.rutland@arm.com,
	michal.simek@xilinx.com, rajanv@xilinx.com, jollys@xilinx.com,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, chinnikishore369@gmail.com
Subject: Re: [PATCH v2 3/3] reset: reset-zynqmp: Adding support for Xilinx zynqmp reset controller.
Date: Fri, 26 Oct 2018 13:08:50 +0200	[thread overview]
Message-ID: <20181026110850.y3jivrbgjtivndvi@pengutronix.de> (raw)
In-Reply-To: <20181026122424.30831-4-nava.manne@xilinx.com>

On Fri, Oct 26, 2018 at 05:54:24PM +0530, Nava kishore Manne wrote:
[...]
> +static int zynqmp_reset_status(struct reset_controller_dev *rcdev,
> +			       unsigned long id)
> +{
> +	struct zynqmp_reset_data *priv = to_zynqmp_reset_data(rcdev);
> +	int val, err;
> +
> +	err = priv->eemi_ops->reset_get_status(ZYNQMP_RESET_ID + id, &val);
> +	if (!err)
> +		return err;

This should be:

	if (err)
		return err;

instead. Otherwise you end up always returning 0 on success ...

> +
> +	return val;

... and uninitialized val on error.

regards
Philipp

      parent reply	other threads:[~2018-10-26 11:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26 12:24 [PATCH v2 0/3] Add reset driver support for ZynqMP Nava kishore Manne
2018-10-26 12:24 ` [PATCH v2 1/3] firmware: xilinx: Add reset API's Nava kishore Manne
2018-10-25 20:43   ` Vesa Jääskeläinen
2018-10-26 12:24 ` [PATCH v2 2/3] dt-bindings: reset: Add bindings for ZynqMP reset driver Nava kishore Manne
2018-10-26 12:24 ` [PATCH v2 3/3] reset: reset-zynqmp: Adding support for Xilinx zynqmp reset controller Nava kishore Manne
2018-10-25 20:53   ` Vesa Jääskeläinen
2018-10-26 11:08   ` Philipp Zabel [this message]

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=20181026110850.y3jivrbgjtivndvi@pengutronix.de \
    --to=pza@pengutronix.de \
    --cc=chinnikishore369@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jollys@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=michal.simek@xilinx.com \
    --cc=nava.manne@xilinx.com \
    --cc=rajanv@xilinx.com \
    --cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).