staging: lustre: drop redundant check
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 31 Jul 2015 11:02:43 +0000 (16:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Jul 2015 23:03:50 +0000 (16:03 -0700)
There is no need to verify that its an error, as we are anyway going to
match the error value to -ENOENT.  Drop the redundant check.

Reported-by: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/lu_object.c

index 4d9b6333eeae856af9115a56b6b21357b1cc7e19..9469a250d8dc9c69e300931f95ff2b6f57191d23 100644 (file)
@@ -674,7 +674,7 @@ static struct lu_object *lu_object_find_try(const struct lu_env *env,
        cfs_hash_bd_lock(hs, &bd, 1);
 
        shadow = htable_lookup(s, &bd, f, waiter, &version);
-       if (likely(IS_ERR(shadow) && PTR_ERR(shadow) == -ENOENT)) {
+       if (likely(PTR_ERR(shadow) == -ENOENT)) {
                struct lu_site_bkt_data *bkt;
 
                bkt = cfs_hash_bd_extra_get(hs, &bd);