From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933869AbbHKIDY (ORCPT ); Tue, 11 Aug 2015 04:03:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:59334 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933483AbbHKIDQ (ORCPT ); Tue, 11 Aug 2015 04:03:16 -0400 Date: Tue, 11 Aug 2015 10:03:11 +0200 From: Jan Kara To: Dan Carpenter Cc: Jan Kara , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [patch] quota: remove an unneeded condition Message-ID: <20150811080311.GC2650@quack.suse.cz> References: <20150810212955.GA31724@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150810212955.GA31724@mwanda> 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 On Tue 11-08-15 00:29:55, Dan Carpenter wrote: > We know "ret" is zero here so we can remove this condition. > > Signed-off-by: Dan Carpenter Thanks. I've added the patch to my tree. Honza > diff --git a/fs/quota/quota.c b/fs/quota/quota.c > index 86ded73..3746367 100644 > --- a/fs/quota/quota.c > +++ b/fs/quota/quota.c > @@ -141,9 +141,9 @@ static int quota_getinfo(struct super_block *sb, int type, void __user *addr) > if (tstate->flags & QCI_ROOT_SQUASH) > uinfo.dqi_flags |= DQF_ROOT_SQUASH; > uinfo.dqi_valid = IIF_ALL; > - if (!ret && copy_to_user(addr, &uinfo, sizeof(uinfo))) > + if (copy_to_user(addr, &uinfo, sizeof(uinfo))) > return -EFAULT; > - return ret; > + return 0; > } > > static int quota_setinfo(struct super_block *sb, int type, void __user *addr) > -- Jan Kara SUSE Labs, CR