From patchwork Sun Apr 3 05:21:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 8733021 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 437059F36E for ; Sun, 3 Apr 2016 05:26:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6AF0120251 for ; Sun, 3 Apr 2016 05:26:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8D86E2022D for ; Sun, 3 Apr 2016 05:26:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752682AbcDCF0a (ORCPT ); Sun, 3 Apr 2016 01:26:30 -0400 Received: from mail-ig0-f194.google.com ([209.85.213.194]:34544 "EHLO mail-ig0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752406AbcDCFXm (ORCPT ); Sun, 3 Apr 2016 01:23:42 -0400 Received: by mail-ig0-f194.google.com with SMTP id mh10so7638296igb.1; Sat, 02 Apr 2016 22:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jp4VYVfBuPthRfjrVHxOzS7Qivnq5KE2DTSmU1H1y9Y=; b=cVnEcGB97yV6/UiKuVL3uBhFCX3/ej7kPe1EqnHAar0ppVL+JOyLmVZDe4qE1U4BJB ex4XhO6jfPio9vunfmLnP2J6fTNFWwbjCQ6aO0eZThwcY9/7oaPmMUHeQHVpgEoG6Ad0 3V8nkDXH+cIPRwD9CxZRaQJqwspedZvQjpYRvr3bHTkdKQ3X/FZtHdNnkvtvYVM7fGJR avvGY7EXsACJ+eAqDCAHIrT421xC5BL8Vllby0cWz/cAmvSFookXqho5CYEdur8ad7im 5JPhUVpn8KaRFxJSbO97AidJKmnHMBm8L9zi3T5zeAVaisnGVpppQkgI6XDb2XUFsjNM g4Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jp4VYVfBuPthRfjrVHxOzS7Qivnq5KE2DTSmU1H1y9Y=; b=UWMg6RXdJPUZxV8NemJuj6W4TrUBcyQz6VYLEHpolwvJLCSI8GMU0Ox+w/paJeF4oq eYNtGkuFFWl041eSidBQPPMVrsXmysBXaN0OG3e2DdYbn9ihQEBHpMGvt8v8enMkKu2/ 8DgtUKNongMAgHKxbB3+xEFIpgK1tEZkJqeXWuOI+pKt96TVn5myJR1lrACNlNXrP05x KOHbhxkU2P8gyftzk3WBSSzLUtfqhaSDAor34iIuQd/Lfx7/7m/OFrcq45uJ/fI0/BKd zhOoFnZJgchO6Y6Ufhxf+b8jPQx1IlmQvavVb63cWf7NKZiZqz/JB0Io3EFB48q9dAOH vc/A== X-Gm-Message-State: AD7BkJL/DpLwFY4UxCXNd0tewzayHAYUBVn6y28+QOUWpeOhpwVZzi1EKAkdW+CN105Opw== X-Received: by 10.50.44.47 with SMTP id b15mr5510315igm.89.1459661021549; Sat, 02 Apr 2016 22:23:41 -0700 (PDT) Received: from localhost.localdomain (c-24-7-245-123.hsd1.mn.comcast.net. [24.7.245.123]) by smtp.gmail.com with ESMTPSA id je6sm2914954igb.15.2016.04.02.22.23.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 02 Apr 2016 22:23:41 -0700 (PDT) From: Eric Biggers To: linux-fsdevel@vger.kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, jaegeuk@kernel.org, tytso@mit.edu, mhalcrow@google.com, Eric Biggers Subject: [PATCH 06/13] fscrypto: crypto_alloc_skcipher() always returns an ERR_PTR(), never NULL Date: Sun, 3 Apr 2016 00:21:57 -0500 Message-Id: <1459660924-2960-7-git-send-email-ebiggers3@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1459660924-2960-1-git-send-email-ebiggers3@gmail.com> References: <1459660924-2960-1-git-send-email-ebiggers3@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Eric Biggers --- fs/crypto/keyinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/crypto/keyinfo.c b/fs/crypto/keyinfo.c index 33296c0..cb06351 100644 --- a/fs/crypto/keyinfo.c +++ b/fs/crypto/keyinfo.c @@ -208,8 +208,8 @@ retry: goto out; got_key: ctfm = crypto_alloc_skcipher(cipher_str, 0, 0); - if (!ctfm || IS_ERR(ctfm)) { - res = ctfm ? PTR_ERR(ctfm) : -ENOMEM; + if (IS_ERR(ctfm)) { + res = PTR_ERR(ctfm); printk(KERN_DEBUG "%s: error %d (inode %u) allocating crypto tfm\n", __func__, res, (unsigned) inode->i_ino);