Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: herbert@gondor.apana.org.au
Cc: marex@denx.de, linux-crypto@vger.kernel.org,
	Fabio Estevam <fabio.estevam@freescale.com>
Subject: [PATCH 2/2] crypto: mxs-dcp: Check the return value of stmp_reset_block()
Date: Tue, 28 Jan 2014 22:36:12 -0200	[thread overview]
Message-ID: <1390955772-6936-2-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1390955772-6936-1-git-send-email-festevam@gmail.com>

From: Fabio Estevam <fabio.estevam@freescale.com>

stmp_reset_block() may fail, so check its return value and propagate it in the
case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/crypto/mxs-dcp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index 2d7d497..4d18c40 100644
--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -942,7 +942,9 @@ static int mxs_dcp_probe(struct platform_device *pdev)
 	}
 
 	/* Restart the DCP block. */
-	stmp_reset_block(sdcp->base);
+	ret = stmp_reset_block(sdcp->base);
+	if (ret)
+		goto err_mutex;
 
 	/* Initialize control register. */
 	writel(MXS_DCP_CTRL_GATHER_RESIDUAL_WRITES |
-- 
1.8.1.2

  reply	other threads:[~2014-01-29  0:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29  0:36 [PATCH 1/2] crypto: mxs-dcp: Use devm_kzalloc() Fabio Estevam
2014-01-29  0:36 ` Fabio Estevam [this message]
2014-01-29  0:58   ` [PATCH 2/2] crypto: mxs-dcp: Check the return value of stmp_reset_block() Marek Vasut
2014-01-29  0:58 ` [PATCH 1/2] crypto: mxs-dcp: Use devm_kzalloc() Marek Vasut
2014-02-09  9:22   ` Herbert Xu

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=1390955772-6936-2-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=fabio.estevam@freescale.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=marex@denx.de \
    /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