From patchwork Mon Oct 17 15:16:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9379611 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 933E9600CA for ; Mon, 17 Oct 2016 15:16:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 846A928854 for ; Mon, 17 Oct 2016 15:16:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 790FD28A19; Mon, 17 Oct 2016 15:16:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12895289FB for ; Mon, 17 Oct 2016 15:16:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934988AbcJQPQp (ORCPT ); Mon, 17 Oct 2016 11:16:45 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:35678 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933347AbcJQPQm (ORCPT ); Mon, 17 Oct 2016 11:16:42 -0400 Received: by mail-pa0-f66.google.com with SMTP id qn10so9327518pac.2 for ; Mon, 17 Oct 2016 08:16:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D4+OzMZZwoYd8Wi0dMwXMa+3SwD8yaro6nkYRV97isQ=; b=c3/9DKTtQkPLguTcsYH/LxGoQdT7cSdSQO5FfnKS+cE/M9n/CFLBmi1PXvkobhDFAX 9arhir/ldhb+bYhDC2adCJmn6qPMyFI0pyZB2HCMLPIWQzScHCdZk17ZGRjOdLx4UFF/ UiUYf9Ti1SmX9eNn39N5RzF21Tfitiv1YXNMh2JpHin9RMcjtlYPbz50EOu+0KvIz/Vc EzxPQXp7lrpQuwogVZItCrZ2ZJs/OwUNbkI4+k0bAvfGFW4QlasJU3bIT35wpjNUbgRP GBynkVeyeCDEiWyK1eMvqnGtUW5+14ICrMoJvlVqCVdGMZYe0M/YnElxkz1pg5LIJHnt Z8EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D4+OzMZZwoYd8Wi0dMwXMa+3SwD8yaro6nkYRV97isQ=; b=Tgl0pbC2AotlLUnZR1XcEkZwyutIXPAacGlL4cbINXVXdP1i2XkVoohh9BL3sgD9OQ 1Xd2oQmcuH81Sujc9OVlQWPikKuBllaka0pkPq+OcdmPD8cyaMC5eqR/FIVRctouU62u ZJzm8VpMtZUUWI9sF5il6qGi3x5CUgotFQwGMdc8a9pJFib0d7qpnTilvWKCQ99Tnn4L ugUxcaPfPg+aWz9vnMGP1Em7yKow/rcIkZMv4yXFvuSajPTJ7xo5+BzEOpsp0VJGknah if3PBfiqI7FGcJcw3CO80aym+WyS6i6TgOVG+lchSzyEg6rRSTjHhkdfNTDbyR3AGJwb Hj3A== X-Gm-Message-State: AA6/9RmT5LYV274Sy5kbBGu1D3NZnvupIZXXrv2UcbDKqYRO/T6UF1wljNBom6GUXs72SA== X-Received: by 10.66.21.162 with SMTP id w2mr31974161pae.160.1476717401516; Mon, 17 Oct 2016 08:16:41 -0700 (PDT) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id t6sm49047905paa.45.2016.10.17.08.16.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Oct 2016 08:16:41 -0700 (PDT) From: Wei Yongjun To: Dan Williams , Vinod Koul Cc: Wei Yongjun , dmaengine@vger.kernel.org Subject: [PATCH -next] dmaengine: edma: Fix error return code in edma_alloc_chan_resources() Date: Mon, 17 Oct 2016 15:16:35 +0000 Message-Id: <1476717395-15999-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/dma/edma.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 844e87b..ec478a2 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -1624,6 +1624,7 @@ static int edma_alloc_chan_resources(struct dma_chan *chan) if (echan->slot[0] < 0) { dev_err(dev, "Entry slot allocation failed for channel %u\n", EDMA_CHAN_SLOT(echan->ch_num)); + ret = echan->slot[0]; goto err_slot; }