From patchwork Sat Nov 13 02:07:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Samuel X-Patchwork-Id: 321902 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 oAD27J5E009990 for ; Sat, 13 Nov 2010 02:07:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757308Ab0KMCHO (ORCPT ); Fri, 12 Nov 2010 21:07:14 -0500 Received: from csamuel.org ([74.50.50.137]:33405 "EHLO csamuel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754354Ab0KMCHO (ORCPT ); Fri, 12 Nov 2010 21:07:14 -0500 Received: from localhost (localhost [127.0.0.1]) by csamuel.org (Postfix) with ESMTP id A12A2A40B9; Sat, 13 Nov 2010 13:07:12 +1100 (EST) Received: from csamuel.org ([127.0.0.1]) by localhost (csamuel.org [127.0.0.1]) (amavisd-maia, port 10024) with LMTP id 09872-01; Sat, 13 Nov 2010 13:07:12 +1100 (EST) Received: from [10.71.4.139] (unknown [67.201.84.8]) by csamuel.org (Postfix) with ESMTPSA id 5618AA40AB; Sat, 13 Nov 2010 13:07:12 +1100 (EST) Message-ID: <4CDDF2CF.9060605@csamuel.org> Date: Sat, 13 Nov 2010 13:07:11 +1100 From: Chris Samuel User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101028 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: linux-btrfs@vger.kernel.org CC: Chris Mason Subject: [PATCH] kmem_cache_alloc doesn't return ERR_PTR so no need to check for it. Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 13 Nov 2010 02:07:19 +0000 (UTC) diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 23cb8da..8797704 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -50,7 +50,7 @@ struct extent_map *alloc_extent_map(gfp_t mask) { struct extent_map *em; em = kmem_cache_alloc(extent_map_cache, mask); - if (!em || IS_ERR(em)) + if (!em) return em; em->in_tree = 0; em->flags = 0;