diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2006-12-17 19:10:25 +0100 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-01-06 15:59:52 +0100 |
commit | 59c17ec1690fd76ce6ae586daac29b04601be3e0 (patch) | |
tree | b4785ba61c29a4102586fad0534d9d8d430d47cb | |
parent | [SCSI] iscsi: fix 2.6.19 data digest calculation bug (diff) | |
download | linux-59c17ec1690fd76ce6ae586daac29b04601be3e0.tar.xz linux-59c17ec1690fd76ce6ae586daac29b04601be3e0.zip |
[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.c | 4 |
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) tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0, CRYPTO_ALG_ASYNC); tcp_conn->tx_hash.flags = 0; - if (!tcp_conn->tx_hash.tfm) + if (IS_ERR(tcp_conn->tx_hash.tfm)) goto free_tcp_conn; tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0, CRYPTO_ALG_ASYNC); tcp_conn->rx_hash.flags = 0; - if (!tcp_conn->rx_hash.tfm) + if (IS_ERR(tcp_conn->rx_hash.tfm)) goto free_tx_tfm; return cls_conn; |