From patchwork Sat Jan 29 19:54:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shirish Pargaonkar X-Patchwork-Id: 516941 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 p0TJuHw0024007 for ; Sat, 29 Jan 2011 19:56:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753087Ab1A2T4Q (ORCPT ); Sat, 29 Jan 2011 14:56:16 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:52271 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752634Ab1A2T4P (ORCPT ); Sat, 29 Jan 2011 14:56:15 -0500 Received: by iyj18 with SMTP id 18so3627352iyj.19 for ; Sat, 29 Jan 2011 11:56:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=k1Aae+JEJRarBvS+Rt9PQ8+p5xwjUGMdvUmM4KxQMRM=; b=TnA1nY/sNuV7GoDWNcmXKL9sV87cwYRau9qXI7mwwgzNMxbGQ4PiLzOrGvR+AMdiQd xv2CB6QZDKvVL5qvA9tgk16G53Obdm+EMguIb0A2Xuqgef8J4b1DrD6Th6f6mjDBJImK ucgIOAn6VgKcIHsgVCfWflsXJDdpU80P3LUk4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=HfJluQThCqfrvBVmtyMRIupp3k0weRDVTN5K5quBw70nxD9RiC9I2/FamI9MUJnbq7 t9omEytj2alYw7poQxO96/BAdh03gO9pMDqgKT7bCF3A8MVcypkOEINiBhfbue5/d6R0 ue9nlQyw7g+6P0Ju1if6d6Io4WNUGT9MuNt7M= Received: by 10.231.36.137 with SMTP id t9mr4346153ibd.195.1296330975049; Sat, 29 Jan 2011 11:56:15 -0800 (PST) Received: from localhost ([32.97.110.58]) by mx.google.com with ESMTPS id gy41sm16134775ibb.23.2011.01.29.11.56.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 Jan 2011 11:56:14 -0800 (PST) From: shirishpargaonkar@gmail.com To: smfrench@gmail.com Cc: linux-cifs@vger.kernel.org, Shirish Pargaonkar Subject: [PATCH] cifs: No need to check crypto blockcipher allocation Date: Sat, 29 Jan 2011 13:54:58 -0600 Message-Id: <1296330898-1442-1-git-send-email-shirishpargaonkar@gmail.com> X-Mailer: git-send-email 1.6.0.2 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 19:56:18 +0000 (UTC) diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index 0db5f1d..a51585f 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c @@ -657,9 +657,10 @@ calc_seckey(struct cifsSesInfo *ses) get_random_bytes(sec_key, CIFS_SESS_KEY_SIZE); tfm_arc4 = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); - if (!tfm_arc4 || IS_ERR(tfm_arc4)) { + if (IS_ERR(tfm_arc4)) { + rc = PTR_ERR(tfm_arc4); cERROR(1, "could not allocate crypto API arc4\n"); - return PTR_ERR(tfm_arc4); + return rc; } desc.tfm = tfm_arc4;