From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934360AbbEMNcz (ORCPT ); Wed, 13 May 2015 09:32:55 -0400 Received: from mga14.intel.com ([192.55.52.115]:22246 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932597AbbEMNcy (ORCPT ); Wed, 13 May 2015 09:32:54 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,420,1427785200"; d="scan'208";a="493084075" Date: Wed, 13 May 2015 09:32:52 -0400 From: Matthew Wilcox To: Nicholas Krause Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] block:Change the function,nvme_alloc_queue to use -ENOMEM for when failing memory allocations Message-ID: <20150513133252.GW4003@linux.intel.com> References: <1431474691-30469-1-git-send-email-xerofoify@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431474691-30469-1-git-send-email-xerofoify@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 12, 2015 at 07:51:31PM -0400, Nicholas Krause wrote: > This changes the function,nvme_alloc_queue to use the kernel code, > -ENOMEM for when failing to allocate the memory required for the > nvme_queue structure pointer,nvme in order to correctly return > to the caller the correct reason for this function's failing. > if (!nvmeq) > - return NULL; > + return -ENOMEM; > You didn't even compile-test this, did you?