From patchwork Tue May 28 05:26:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2622951 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id C1C0E40077 for ; Tue, 28 May 2013 05:26:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932629Ab3E1F0z (ORCPT ); Tue, 28 May 2013 01:26:55 -0400 Received: from mail-bk0-f41.google.com ([209.85.214.41]:65083 "EHLO mail-bk0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932458Ab3E1F0y (ORCPT ); Tue, 28 May 2013 01:26:54 -0400 Received: by mail-bk0-f41.google.com with SMTP id jc10so3970990bkc.14 for ; Mon, 27 May 2013 22:26:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=v7EvjZqdiVkcAGKFY19O6iVw+NHnwRwiH/LN4EDl4uk=; b=VCQQ3XYWC4g2lVg+GRKUDalSFCEF1gWGxmkmpV+pwEFvNZtkU+yS1W0YwuJ8iL402v q3+9cbzGWVDY4etMSVYIkVEzhYAD/hT1FvWPq93UvJgKMnuEgm9KMo1b0VUSrXTkaQ0+ jsK+LJJbofPmgsdfUBC3VfueWu92yw8OHLeoLILnIwwHf6rbX0mMr8FalUC0OP9C2CEe 4Y1wRPDIPH+J6XgPjTptTrG9FJsQzQ0JqkdYlhkmkaZC1NOiV65l+JRPTe53D0lF3DJZ ldOkK6nJyLlNQ8WEoVMulcpK1QJvF5HsU7nhTWFy3q4t+Fifq9IbUOWt7qk7y4GW1qbT itmg== MIME-Version: 1.0 X-Received: by 10.205.115.73 with SMTP id fd9mr12848155bkc.58.1369718810838; Mon, 27 May 2013 22:26:50 -0700 (PDT) Received: by 10.204.39.1 with HTTP; Mon, 27 May 2013 22:26:50 -0700 (PDT) Date: Tue, 28 May 2013 13:26:50 +0800 Message-ID: Subject: [PATCH] mmc: sh_mobile_sdhi: fix error return code in sh_mobile_sdhi_probe() From: Wei Yongjun To: g.liakhovetski@gmx.de, ian@mnementh.co.uk, cjb@laptop.org, grant.likely@linaro.org, rob.herring@calxeda.com Cc: yongjun_wei@trendmicro.com.cn, linux-mmc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Wei Yongjun Fix to return a negative error code instead of 0 when we cannot get IRQ source by platform_get_irq(), as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/mmc/host/sh_mobile_sdhi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" 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/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index cc4c872..a4316b3 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -273,8 +273,10 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) } /* There must be at least one IRQ source */ - if (!i) + if (!i) { + ret = irq; goto eirq; + } } dev_info(&pdev->dev, "%s base at 0x%08lx clock rate %u MHz\n",