summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-pl061.c
diff options
context:
space:
mode:
authorAlexander Sverdlin <alexander.sverdlin@nokia.com>2020-03-03 12:28:28 +0300
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2020-03-25 11:50:45 +0300
commit1a555713ac9d169dbe43363aafe0633f2dc58daf (patch)
treea606c92ee6fb6651cd643bd6678dfbbd58beff31 /drivers/gpio/gpio-pl061.c
parentf8c3cea834d27ad1a292f735ef092be7aaef1bba (diff)
downloadlinux-1a555713ac9d169dbe43363aafe0633f2dc58daf.tar.xz
gpio: pl061: Warn when IRQ line has not been configured
Existing (irq < 0) condition is always false because adev->irq has unsigned type and contains 0 in case of failed irq_of_parse_and_map(). Up to now all the mapping errors were silently ignored. Seems that repairing this check would be backwards-incompatible and might break the probe() for the implementations without IRQ support. Therefore warn the user instead. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio/gpio-pl061.c')
-rw-r--r--drivers/gpio/gpio-pl061.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
index 5df7782e348f..3439120f166a 100644
--- a/drivers/gpio/gpio-pl061.c
+++ b/drivers/gpio/gpio-pl061.c
@@ -326,10 +326,8 @@ static int pl061_probe(struct amba_device *adev, const struct amba_id *id)
writeb(0, pl061->base + GPIOIE); /* disable irqs */
irq = adev->irq[0];
- if (irq < 0) {
- dev_err(&adev->dev, "invalid IRQ\n");
- return -ENODEV;
- }
+ if (!irq)
+ dev_warn(&adev->dev, "IRQ support disabled\n");
pl061->parent_irq = irq;
girq = &pl061->gc.irq;