Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=59c17ec1690fd76ce6ae586daac29b04601be3e0
Commit:     59c17ec1690fd76ce6ae586daac29b04601be3e0
Parent:     c959e1c2a475e0ad0d24eff200de9b6dcb3710c6
Author:     Akinobu Mita <[EMAIL PROTECTED]>
AuthorDate: Sun Dec 17 12:10:25 2006 -0600
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Sat Jan 6 08:59:52 2007 -0600

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Mike Christie <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 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 61e3a61..8889686 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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to