From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1168971AbcKALmd (ORCPT ); Tue, 1 Nov 2016 07:42:33 -0400 Received: from b.ns.miles-group.at ([95.130.255.144]:44724 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1168943AbcKALmb (ORCPT ); Tue, 1 Nov 2016 07:42:31 -0400 Subject: Re: [PATCH] UBIFS: Remove some dead code To: Christophe JAILLET , dedekind1@gmail.com, adrian.hunter@intel.com References: <20161101064525.11813-1-christophe.jaillet@wanadoo.fr> Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org From: Richard Weinberger Message-ID: Date: Tue, 1 Nov 2016 12:42:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <20161101064525.11813-1-christophe.jaillet@wanadoo.fr> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01.11.2016 07:45, Christophe JAILLET wrote: > 'ubifs_fast_find_freeable()' can not return an error pointer, so this test > can be removed. > > Signed-off-by: Christophe JAILLET > --- > fs/ubifs/gc.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c > index e845c64b6ce1..7b35e3d6cde7 100644 > --- a/fs/ubifs/gc.c > +++ b/fs/ubifs/gc.c > @@ -846,10 +846,6 @@ int ubifs_gc_start_commit(struct ubifs_info *c) > */ > while (1) { > lp = ubifs_fast_find_freeable(c); > - if (IS_ERR(lp)) { > - err = PTR_ERR(lp); > - goto out; > - } Good catch, how did you find this? If you have a tool/script I'd like to use it too. Thanks, //richard