Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wei Yongjun and committed by
Chris Ball
7913ae7d 5a0e8074

+3 -1
+3 -1
drivers/mmc/host/sh_mobile_sdhi.c
··· 273 273 } 274 274 275 275 /* There must be at least one IRQ source */ 276 - if (!i) 276 + if (!i) { 277 + ret = irq; 277 278 goto eirq; 279 + } 278 280 } 279 281 280 282 dev_info(&pdev->dev, "%s base at 0x%08lx clock rate %u MHz\n",