mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-09 02:57:42 -04:00
mmc: renesas_sdhi: improve registering irqs
The probe() function is convoluted enough, so merge sanity checks for number of irqs into one place. Also, change the error code for 'no irq' because ENXIO will not print a warning from the driver core. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20250331064400.16677-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
committed by
Ulf Hansson
parent
8e127dbbf6
commit
7473647c35
@@ -1240,15 +1240,10 @@ int renesas_sdhi_probe(struct platform_device *pdev,
|
||||
|
||||
sd_ctrl_write32_as_16_and_16(host, CTL_IRQ_MASK, host->sdcard_irq_mask_all);
|
||||
|
||||
num_irqs = platform_irq_count(pdev);
|
||||
if (num_irqs < 0) {
|
||||
ret = num_irqs;
|
||||
goto edisclk;
|
||||
}
|
||||
|
||||
/* There must be at least one IRQ source */
|
||||
if (!num_irqs) {
|
||||
ret = -ENXIO;
|
||||
num_irqs = platform_irq_count(pdev);
|
||||
if (num_irqs <= 0) {
|
||||
ret = num_irqs ?: -ENOENT;
|
||||
goto edisclk;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user