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" <kir...@shutemov.name>
Signed-off-by: Viresh Kumar <viresh.ku...@linaro.org>
---
 drivers/staging/lustre/lustre/obdclass/lu_object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c 
b/drivers/staging/lustre/lustre/obdclass/lu_object.c
index 6cd3af8c6237..8e472327c880 100644
--- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
@@ -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);
-- 
2.4.0

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to