staging: lustre: remove assignment in if condition
authorHimangi Saraogi <himangi774@gmail.com>
Sat, 1 Mar 2014 21:31:17 +0000 (03:01 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 01:35:27 +0000 (17:35 -0800)
This patch removes the assignment in if conditions to do away with the
checkpatch warning :'do not use assignment in if condition'.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/gss/gss_krb5_mech.c

index 6eda1799be8f45b015ad1079f4f8c031be466fb7..d03f6c114171b849c7161dd3ea96dae6582ad6b0 100644 (file)
@@ -678,7 +678,8 @@ __s32 krb5_make_checksum(__u32 enctype,
        __u32             code = GSS_S_FAILURE;
        int                 rc;
 
-       if (!(tfm = ll_crypto_alloc_hash(ke->ke_hash_name, 0, 0))) {
+       tfm = ll_crypto_alloc_hash(ke->ke_hash_name, 0, 0);
+       if (!tfm) {
                CERROR("failed to alloc TFM: %s\n", ke->ke_hash_name);
                return GSS_S_FAILURE;
        }