From patchwork Fri Jul 4 19:10:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 4483061 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4C29DBEEAA for ; Fri, 4 Jul 2014 19:10:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8647B203B0 for ; Fri, 4 Jul 2014 19:10:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B88CC2039D for ; Fri, 4 Jul 2014 19:10:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754979AbaGDTKc (ORCPT ); Fri, 4 Jul 2014 15:10:32 -0400 Received: from mailrelay001.isp.belgacom.be ([195.238.6.51]:29635 "EHLO mailrelay001.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752821AbaGDTKb (ORCPT ); Fri, 4 Jul 2014 15:10:31 -0400 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvAMACX7tlNbsGwr/2dsb2JhbABagw6scAUBAQEBAQEFAW4BmWeBCxd1hGAjgRo3iEYBtVCVIIVwiTIdhC0FmnaLTIhAg0U7 Received: from 43.108-176-91.adsl-dyn.isp.belgacom.be (HELO localhost.localdomain) ([91.176.108.43]) by relay.skynet.be with ESMTP; 04 Jul 2014 21:10:29 +0200 From: Fabian Frederick To: linux-kernel@vger.kernel.org Cc: Fabian Frederick , Chris Mason , Josef Bacik , linux-btrfs@vger.kernel.org Subject: [PATCH 1/1] btrfs: use PTR_ERR_OR_ZERO Date: Fri, 4 Jul 2014 21:10:27 +0200 Message-Id: <1404501027-22752-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 1.9.1 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 replace IS_ERR/PTR_ERR Cc: Chris Mason Cc: Josef Bacik Cc: linux-btrfs@vger.kernel.org Signed-off-by: Fabian Frederick --- fs/btrfs/hash.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/btrfs/hash.c b/fs/btrfs/hash.c index 85889aa..64f15bb 100644 --- a/fs/btrfs/hash.c +++ b/fs/btrfs/hash.c @@ -20,10 +20,8 @@ static struct crypto_shash *tfm; int __init btrfs_hash_init(void) { tfm = crypto_alloc_shash("crc32c", 0, 0); - if (IS_ERR(tfm)) - return PTR_ERR(tfm); - return 0; + return PTR_ERR_OR_ZERO(tfm); } void btrfs_hash_exit(void)