From patchwork Thu Jun 21 15:01:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10480003 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 14602604D3 for ; Thu, 21 Jun 2018 15:01:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00C0929139 for ; Thu, 21 Jun 2018 15:01:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E749B2921E; Thu, 21 Jun 2018 15:01:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8643B29139 for ; Thu, 21 Jun 2018 15:01:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933283AbeFUPBj (ORCPT ); Thu, 21 Jun 2018 11:01:39 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:46472 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933340AbeFUPBi (ORCPT ); Thu, 21 Jun 2018 11:01:38 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5LEx9Li031229; Thu, 21 Jun 2018 15:01:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2017-10-26; bh=ZdP/XiAxrFgnBgmXk/MM47LANO7D+SLg3XEZyZGgNSw=; b=sG5IOlPOwyttO7QeM62xfMyw4N5WCt+0PShvaxLyKYWCMbtksyziW5tu/lAEnGvDuyjq t56UwjbOkvhzHrUaZs5CZgeZhXhmU9wExiR2Fud1OmpbYdgDbx+jbFEVUVoaWAtdjAZD KrzcLFF8bFPCvfKyCN9JVNBo9xiidQopyPzpReW2TZXLO+o+S/4ZzkALp7qnic6eus3p Ny830WyGi2yDmniaM4Dtwzl22pCi39etRvw9BowgjqPOuTnlOI0xZbZBYfi14YIo1yLT ffd5QUOX7iCSB6y682OTVbplWmZI4zeCVenS7BPRa32Krhnqt3sMR7oFjy+kFE1vCebn JA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2jmr2msa39-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Jun 2018 15:01:12 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5LF1BBE032507 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Jun 2018 15:01:11 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w5LF1Ac3023266; Thu, 21 Jun 2018 15:01:10 GMT Received: from kili.mountain (/10.175.27.136) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 21 Jun 2018 08:01:10 -0700 Date: Thu, 21 Jun 2018 18:01:03 +0300 From: Dan Carpenter To: Steve French , Aurelien Aptel Cc: linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, kernel-janitors@vger.kernel.org Subject: [PATCH] CIFS: Fix error code in smb311_posix_mkdir() Message-ID: <20180621150103.2zl7be4yzzotnqgw@kili.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170113 (1.7.2) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8930 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=695 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806210166 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The error assignment needs to go before the goto. Fixes: 5539e9b24a38 ("CIFS: fix memory leak and remove dead code") Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 062a2a59beb3..c9489b1160f0 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -1946,8 +1946,8 @@ int smb311_posix_mkdir(const unsigned int xid, struct inode *inode, if (ses && (ses->server)) server = ses->server; else { - goto err_free_path; rc = -EIO; + goto err_free_path; } /* resource #2: request */