From patchwork Mon Sep 17 04:27:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inderpal Singh X-Patchwork-Id: 11455 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1BB1423E54 for ; Mon, 17 Sep 2012 04:28:03 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4F443A1BBF1 for ; Mon, 17 Sep 2012 04:28:02 +0000 (UTC) Received: by ieak11 with SMTP id k11so8674274iea.11 for ; Sun, 16 Sep 2012 21:28:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=p46VR792zFFoHeZ0acPCj9tipPZz/KHP6wiGQ/MAFyA=; b=arJzYFB7qMr4+ziS9EQRV4Fj0ZJcaGt7N2fK1xNOR72Qcr3CX76Lupahp9NdyEsK+Y JObjp5gwwuqHQdmz2AqzBO1HcarBRPUQ8JaEj+8aJ9oSJLyv+hwGUnyznstfidu31V+a 1WMVBpR0okz8IqJToIV8L4bVX9+noBnNbSjNbf00yW+1j85TLc7N0AVQEdkOCETckzTl jnfLMr7G2OE0fqodLh9sp6Ie9gOc8wQunPeFDYgleZi/fsi9dtSzcPogcOF9a6VujLbs mNaF3RIAoTpJdn0h2Jk8GUP9NNNBP258xtbLSh9yhtEX4Dw+/v4VK6l7eY660Jc5huTE HnWw== Received: by 10.50.217.227 with SMTP id pb3mr5555026igc.28.1347856081734; Sun, 16 Sep 2012 21:28:01 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp294876igc; Sun, 16 Sep 2012 21:28:01 -0700 (PDT) Received: by 10.68.201.73 with SMTP id jy9mr20329841pbc.124.1347856080627; Sun, 16 Sep 2012 21:28:00 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id vn9si13869817pbc.287.2012.09.16.21.28.00 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 16 Sep 2012 21:28:00 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of inderpal.singh@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of inderpal.singh@linaro.org) smtp.mail=inderpal.singh@linaro.org Received: by dade7 with SMTP id e7so4596576dad.37 for ; Sun, 16 Sep 2012 21:27:59 -0700 (PDT) Received: by 10.66.84.229 with SMTP id c5mr17988037paz.12.1347856079683; Sun, 16 Sep 2012 21:27:59 -0700 (PDT) Received: from inder-ubuntu.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPS id te6sm1263675pbc.29.2012.09.16.21.27.53 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 16 Sep 2012 21:27:59 -0700 (PDT) From: Inderpal Singh To: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kgene.kim@samsung.com, vinod.koul@intel.com, patches@linaro.org, boojin.kim@samsung.com, jassisinghbrar@gmail.com, Inderpal Singh Subject: [PATCH] DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources Date: Mon, 17 Sep 2012 09:57:45 +0530 Message-Id: <1347856065-14027-1-git-send-email-inderpal.singh@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQkdt3CuiMRf/0MMfV5nWzZrEOc9F8EqPNSI5TZdsB6j7AZo2VnIerLyw9G1g7YTf/gtSBxc Since 0 is not considered as error at dmaengine level, return ENOMEM from pl330_alloc_chan_resources in case of failure. Signed-off-by: Inderpal Singh Acked-by: Jassi Brar Acked-by: Kukjin Kim --- drivers/dma/pl330.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index e4feba6..14d881c 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2393,7 +2393,7 @@ static int pl330_alloc_chan_resources(struct dma_chan *chan) pch->pl330_chid = pl330_request_channel(&pdmac->pif); if (!pch->pl330_chid) { spin_unlock_irqrestore(&pch->lock, flags); - return 0; + return -ENOMEM; } tasklet_init(&pch->task, pl330_tasklet, (unsigned long) pch);