Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760560Ab3DCNGn (ORCPT ); Wed, 3 Apr 2013 09:06:43 -0400 Received: from mail-bk0-f48.google.com ([209.85.214.48]:38551 "EHLO mail-bk0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758087Ab3DCNGm (ORCPT ); Wed, 3 Apr 2013 09:06:42 -0400 MIME-Version: 1.0 Date: Wed, 3 Apr 2013 21:06:40 +0800 Message-ID: Subject: [PATCH -next] mxs/spi: fix error return code in mxs_spi_probe() From: Wei Yongjun To: grant.likely@secretlab.ca, broonie@opensource.wolfsonmicro.com, rob.herring@calxeda.com Cc: yongjun_wei@trendmicro.com.cn, spi-devel-general@lists.sourceforge.net, devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 944 Lines: 28 From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/spi/spi-mxs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 7b1c014..8498276 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c @@ -570,6 +570,7 @@ static int mxs_spi_probe(struct platform_device *pdev) ssp->dmach = dma_request_slave_channel(&pdev->dev, "rx-tx"); if (!ssp->dmach) { dev_err(ssp->dev, "Failed to request DMA\n"); + ret = -ENODEV; goto out_master_free; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/