]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: meson-mx-sdio: add IRQ check
authorSergey Shtylyov <s.shtylyov@omp.ru>
Fri, 17 Dec 2021 20:27:17 +0000 (23:27 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 21 Dec 2021 12:22:34 +0000 (13:22 +0100)
commit0fc2cb6789ba900d08e1757346c8930e8665eb35
treef631f16a62aea4ff47dd282ead1040f327bc00e5
parent8093526947fe3fed51a80d7e3cb627fc8242fda8
mmc: meson-mx-sdio: add IRQ check

The driver neglects to check the result of platform_get_irq()'s call and
blithely passes the negative error codes to devm_request_threaded_irq()
(which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding
an original error code. Stop calling devm_request_threaded_irq() with the
invalid IRQ #s.

Fixes: 9b6daeb16570 ("mmc: meson-mx-sdio: Add a driver for the Amlogic Meson8 and Meson8b SoC")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20211217202717.10041-3-s.shtylyov@omp.ru
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/meson-mx-sdio.c