[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1455589585-7275-1-git-send-email-wuninsu@gmail.com>
Date: Mon, 15 Feb 2016 21:26:25 -0500
From: Insu Yun <wuninsu@...il.com>
To: philipp.reisner@...bit.com, lars.ellenberg@...bit.com,
drbd-dev@...ts.linbit.com, linux-kernel@...r.kernel.org
Cc: taesoo@...ech.edu, yeongjin.jang@...ech.edu, insu@...ech.edu,
changwoo@...ech.edu, Insu Yun <wuninsu@...il.com>
Subject: [PATCH] drbd: correctly handling failed crypto_alloc_hash
crypto_alloc_hash returns an error code, not NULL.
Signed-off-by: Insu Yun <wuninsu@...il.com>
---
drivers/block/drbd/drbd_receiver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 1957fe8..9063462 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -3403,7 +3403,7 @@ static int receive_protocol(struct drbd_connection *connection, struct packet_in
*/
peer_integrity_tfm = crypto_alloc_hash(integrity_alg, 0, CRYPTO_ALG_ASYNC);
- if (!peer_integrity_tfm) {
+ if (IS_ERR(peer_integrity_tfm)) {
drbd_err(connection, "peer data-integrity-alg %s not supported\n",
integrity_alg);
goto disconnect;
--
1.9.1
Powered by blists - more mailing lists