From patchwork Sun Oct 26 09:39:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 5153771 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CD75C9F30B for ; Sun, 26 Oct 2014 09:41:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0D44A202D1 for ; Sun, 26 Oct 2014 09:41:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D90F20204 for ; Sun, 26 Oct 2014 09:41:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XiKIi-0003H0-Oa; Sun, 26 Oct 2014 09:39:52 +0000 Received: from mail-pd0-f177.google.com ([209.85.192.177]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XiKIg-00039a-7Y for linux-arm-kernel@lists.infradead.org; Sun, 26 Oct 2014 09:39:50 +0000 Received: by mail-pd0-f177.google.com with SMTP id v10so3848713pde.22 for ; Sun, 26 Oct 2014 02:39:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version:content-transfer-encoding; bh=KVyXgx4tjAfEoH40uIJxT6VqokchO8ocT31oEk0eDBg=; b=Zdv6eQTDMQ9tXQ6rtfn84xdgwBzAXisrmGb7iV2aTvv61SKB+8HQ37gvKHg6d20h1S 0C1rAi6ZIbHDI/Twhtxr83a5MI54FS5dTheXfKVjqCU4h8Wus1JAIkZBWWjlfvHHvnRr tCJaGHxEyM7WMQapythSLBOQtN0vXyMUCraWjnR4Pq+W4CQCYDrJ11sAHWc7fGH2mATi F/r8q5ZrhL7GvhVNFOpAIs0QjVJKxwGSizbsj01Z9VWXnD6wqlHb0zwUrlSNDlD9tQ/h 0NS86QetBYjuL2ssaslSe7SGnF6IbZbBw8yz5kP9TvIVS1jIsSI3EppmUHUm+TxqbxDD S8Ig== X-Gm-Message-State: ALoCoQlfKknCfD+MMwIaDeiW/qqcu7GFSGykZXz6pOWjmTWQwBFrQnGW4a+WoDVf2/4t4/ENQb2G X-Received: by 10.70.49.167 with SMTP id v7mr16616323pdn.30.1414316369263; Sun, 26 Oct 2014 02:39:29 -0700 (PDT) Received: from [192.168.0.105] (218-164-141-238.dynamic.hinet.net. [218.164.141.238]) by mx.google.com with ESMTPSA id tu10sm8042942pab.14.2014.10.26.02.39.27 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Sun, 26 Oct 2014 02:39:28 -0700 (PDT) Message-ID: <1414316366.4290.4.camel@phoenix> Subject: [PATCH 3/3] soc: ti: knav_qmss_queue: Return proper error if devm_kzalloc fails From: Axel Lin To: Santosh Shilimkar Date: Sun, 26 Oct 2014 17:39:26 +0800 In-Reply-To: <1414316264.4290.2.camel@phoenix> References: <1414316264.4290.2.camel@phoenix> X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141026_023950_288611_059F37BC X-CRM114-Status: GOOD ( 10.20 ) X-Spam-Score: -0.9 (/) Cc: Sandeep Nair , linux-arm-kernel , linux-kernel@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Return -ENOMEM if devm_kzalloc fails. Signed-off-by: Axel Lin --- drivers/soc/ti/knav_qmss_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index d66aaf2..6f22d56 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c @@ -1640,7 +1640,7 @@ static int knav_queue_init_queues(struct knav_device *kdev) size = (1 << kdev->inst_shift) * kdev->num_queues_in_use; kdev->instances = devm_kzalloc(kdev->dev, size, GFP_KERNEL); if (!kdev->instances) - return -1; + return -ENOMEM; for_each_queue_range(kdev, range) { if (range->ops && range->ops->init_range)