From patchwork Sat Jan 29 12:03:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 516451 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0TC2YbQ022587 for ; Sat, 29 Jan 2011 12:03:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752001Ab1A2MDI (ORCPT ); Sat, 29 Jan 2011 07:03:08 -0500 Received: from mail-gy0-f174.google.com ([209.85.160.174]:62022 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751567Ab1A2MDH (ORCPT ); Sat, 29 Jan 2011 07:03:07 -0500 Received: by gyb11 with SMTP id 11so1401518gyb.19 for ; Sat, 29 Jan 2011 04:03:06 -0800 (PST) Received: by 10.146.86.18 with SMTP id j18mr5651571yab.7.1296302586117; Sat, 29 Jan 2011 04:03:06 -0800 (PST) Received: from salusa.poochiereds.net (cpe-071-070-153-003.nc.res.rr.com [71.70.153.3]) by mx.google.com with ESMTPS id z12sm23080794anp.19.2011.01.29.04.03.05 (version=SSLv3 cipher=RC4-MD5); Sat, 29 Jan 2011 04:03:05 -0800 (PST) From: Jeff Layton To: smfrench@gmail.com Cc: linux-cifs@vger.kernel.org, shirishpargaonkar@gmail.com Subject: [PATCH 2/2] cifs: fix two compiler warning about uninitialized vars Date: Sat, 29 Jan 2011 07:03:02 -0500 Message-Id: <1296302582-18953-1-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.7.3.4 MIME-Version: 1.0 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.6 (demeter1.kernel.org [140.211.167.41]); Sat, 29 Jan 2011 12:03:21 +0000 (UTC) diff --git a/fs/cifs/link.c b/fs/cifs/link.c index 02cd60a..e8804d3 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c @@ -55,8 +55,9 @@ symlink_hash(unsigned int link_len, const char *link_str, u8 *md5_hash) md5 = crypto_alloc_shash("md5", 0, 0); if (IS_ERR(md5)) { + rc = PTR_ERR(md5); cERROR(1, "%s: Crypto md5 allocation error %d\n", __func__, rc); - return PTR_ERR(md5); + return rc; } size = sizeof(struct shash_desc) + crypto_shash_descsize(md5); sdescmd5 = kmalloc(size, GFP_KERNEL); diff --git a/fs/cifs/smbencrypt.c b/fs/cifs/smbencrypt.c index b5450e9..b5041c8 100644 --- a/fs/cifs/smbencrypt.c +++ b/fs/cifs/smbencrypt.c @@ -58,8 +58,9 @@ mdfour(unsigned char *md4_hash, unsigned char *link_str, int link_len) md4 = crypto_alloc_shash("md4", 0, 0); if (IS_ERR(md4)) { + rc = PTR_ERR(md4); cERROR(1, "%s: Crypto md4 allocation error %d\n", __func__, rc); - return PTR_ERR(md4); + return rc; } size = sizeof(struct shash_desc) + crypto_shash_descsize(md4); sdescmd4 = kmalloc(size, GFP_KERNEL);