Browse Source

mmc: sh_mobile_sdhi: fix error return code in sh_mobile_sdhi_probe()

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 <yongjun_wei@trendmicro.com.cn>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
Wei Yongjun 12 years ago
parent
commit
7913ae7d10
1 changed files with 3 additions and 1 deletions
  1. 3 1
      drivers/mmc/host/sh_mobile_sdhi.c

+ 3 - 1
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",