From patchwork Wed Aug 4 11:25:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suresh Jayaraman X-Patchwork-Id: 117000 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o74BQJEX022239 for ; Wed, 4 Aug 2010 11:26:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932642Ab0HDLZ6 (ORCPT ); Wed, 4 Aug 2010 07:25:58 -0400 Received: from cantor2.suse.de ([195.135.220.15]:37107 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932639Ab0HDLZ4 (ORCPT ); Wed, 4 Aug 2010 07:25:56 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 8A32387D82; Wed, 4 Aug 2010 13:25:55 +0200 (CEST) Message-ID: <4C594E3E.2000903@suse.de> Date: Wed, 04 Aug 2010 16:55:50 +0530 From: Suresh Jayaraman User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100714 SUSE/3.0.6 Thunderbird/3.0.6 MIME-Version: 1.0 To: Jeff Layton Cc: Steve French , linux-cifs@vger.kernel.org Subject: Re: Subject: [PATCH] mount.cifs: remove redundant error assignment References: <4C591054.1070007@suse.de> <20100804065338.6fa9d16b@tlielax.poochiereds.net> In-Reply-To: <20100804065338.6fa9d16b@tlielax.poochiereds.net> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 04 Aug 2010 11:26:20 +0000 (UTC) diff --git a/mount.cifs.c b/mount.cifs.c index 9f04261..3623e76 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -1554,16 +1554,16 @@ add_mtab(char *devname, char *mountpoint, unsigned long flags, const char *fstyp mountent.mnt_freq = 0; mountent.mnt_passno = 0; rc = addmntent(pmntfile, &mountent); + if (rc) { + fprintf(stderr, "unable to add mount entry to mtab\n"); + rc = EX_FILEIO; + } endmntent(pmntfile); unlock_mtab(); SAFE_FREE(mountent.mnt_opts); add_mtab_exit: toggle_dac_capability(1, 0); sigprocmask(SIG_SETMASK, &oldmask, NULL); - if (rc) { - fprintf(stderr, "unable to add mount entry to mtab\n"); - rc = EX_FILEIO; - } return rc; }