Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751423AbbGaLDE (ORCPT ); Fri, 31 Jul 2015 07:03:04 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:36763 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbbGaLDB (ORCPT ); Fri, 31 Jul 2015 07:03:01 -0400 From: Viresh Kumar To: akpm@linux-foundation.org Cc: linaro-kernel@lists.linaro.org, Viresh Kumar , "Kirill A. Shutemov" , Andreas Dilger , Aya Mahfouz , devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM), Dmitry Eremin , Greg Kroah-Hartman , HPDD-discuss@ml01.01.org (moderated list:STAGING - LUSTRE PARALLEL FILESYSTEM), Joe Perches , Julia Lawall , linux-kernel@vger.kernel.org (open list), Oleg Drokin , Supriya Karanth Subject: [PATCH] staging: lustre: drop redundant check Date: Fri, 31 Jul 2015 16:32:43 +0530 Message-Id: <84d006aed984454009e165d57587affa819ac6df.1438340488.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: <20150731102310.GA31850@node.dhcp.inet.fi> References: <20150731102310.GA31850@node.dhcp.inet.fi> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1244 Lines: 30 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" Signed-off-by: Viresh Kumar --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/