diff options
| author | bui duc phuc <phucduc.bui@gmail.com> | 2026-08-13 12:34:04 +0700 |
|---|---|---|
| committer | Ulf Hansson <ulfh@kernel.org> | 2026-09-08 17:26:33 +0200 |
| commit | bcd0398aaa2c302d03fc11b485665ea2aed29fcb (patch) | |
| tree | f2e41c48757ac6af838effe2d6692314b2fab4a3 | |
| parent | 31a43e75e2d4b2b21fbd825a26550cbf6a3ba7b1 (diff) | |
| download | linux-next-bcd0398aaa2c302d03fc11b485665ea2aed29fcb.tar.gz linux-next-bcd0398aaa2c302d03fc11b485665ea2aed29fcb.zip | |
mmc: davinci: Handle optional IRQ return value correctly
host->sdio_irq is assigned from platform_get_irq_optional(), which
returns a positive IRQ number on success or a negative error code on
failure. Therefore, 0 is not a possible return value from this API.
Check for a positive IRQ number before requesting the SDIO IRQ instead
of treating zero as a valid IRQ.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
| -rw-r--r-- | drivers/mmc/host/davinci_mmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index 773577a10512..c503e5f5c886 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1303,7 +1303,7 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) if (ret) goto mmc_add_host_fail; - if (host->sdio_irq >= 0) { + if (host->sdio_irq > 0) { ret = devm_request_irq(&pdev->dev, host->sdio_irq, mmc_davinci_sdio_irq, 0, mmc_hostname(mmc), host); |
