aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-12-17 13:10:25 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-06 09:59:52 -0500
commit59c17ec1690fd76ce6ae586daac29b04601be3e0 (patch)
treeb4785ba61c29a4102586fad0534d9d8d430d47cb
parentc959e1c2a475e0ad0d24eff200de9b6dcb3710c6 (diff)
[SCSI] iscsi: fix crypto_alloc_hash() error check
The return value of crypto_alloc_hash() should be checked by IS_ERR(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/scsi/iscsi_tcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index 61e3a6124c4b..888968631471 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -1777,13 +1777,13 @@ iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx)
1777 tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0, 1777 tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0,
1778 CRYPTO_ALG_ASYNC); 1778 CRYPTO_ALG_ASYNC);
1779 tcp_conn->tx_hash.flags = 0; 1779 tcp_conn->tx_hash.flags = 0;
1780 if (!tcp_conn->tx_hash.tfm) 1780 if (IS_ERR(tcp_conn->tx_hash.tfm))
1781 goto free_tcp_conn; 1781 goto free_tcp_conn;
1782 1782
1783 tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0, 1783 tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0,
1784 CRYPTO_ALG_ASYNC); 1784 CRYPTO_ALG_ASYNC);
1785 tcp_conn->rx_hash.flags = 0; 1785 tcp_conn->rx_hash.flags = 0;
1786 if (!tcp_conn->rx_hash.tfm) 1786 if (IS_ERR(tcp_conn->rx_hash.tfm))
1787 goto free_tx_tfm; 1787 goto free_tx_tfm;
1788 1788
1789 return cls_conn; 1789 return cls_conn;