Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754477AbbHDCT5 (ORCPT ); Mon, 3 Aug 2015 22:19:57 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:36030 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754412AbbHDCTy (ORCPT ); Mon, 3 Aug 2015 22:19:54 -0400 Date: Tue, 4 Aug 2015 07:49:49 +0530 From: Viresh Kumar To: Steven Rostedt Cc: "Kirill A. Shutemov" , Vlastimil Babka , akpm@linux-foundation.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Hans Ulli Kroll , Alexandre Belloni , Oleg Drokin , Andreas Dilger Subject: Re: [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL) Message-ID: <20150804021949.GA15655@linux> References: <55BB42B5.5070409@suse.cz> <20150731102310.GA31850@node.dhcp.inet.fi> <20150803173820.5a6111ea@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150803173820.5a6111ea@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 880 Lines: 26 On 03-08-15, 17:38, Steven Rostedt wrote: > On Fri, 31 Jul 2015 13:23:10 +0300 > "Kirill A. Shutemov" wrote: > > We have two cases in code: > > > > drivers/rtc/rtc-gemini.c: if (likely(IS_ERR(rtc->rtc_dev))) > > drivers/staging/lustre/lustre/obdclass/lu_object.c: if (likely(IS_ERR(shadow) && PTR_ERR(shadow) == -ENOENT)) { > > > > The first one is mistake, I think. Or do we expect rtc_device_register() > > to fail? > > > > The second is redundant. "if (PTR_ERR(shadow) == -ENOENT)" should do the > > job. > > > > Yep, those look like bugs to me. Yeah, I have fixed both of them :) -- viresh -- 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/