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: 932777 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="sG5IOlPO"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41BPzn1RGkz9s19 for ; Fri, 22 Jun 2018 01:01:41 +1000 (AEST) 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 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 */