diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2013-08-03 17:12:07 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2013-08-03 17:12:07 +0000 |
commit | fd034dbcee56f9dc357b2023bb9694c13267a02f (patch) | |
tree | fd989119b279cef230a113bc78d965fed735670d /package/kernel | |
parent | a0499748968845d0433964c37e161ec456fbe1e9 (diff) | |
download | master-187ad058-fd034dbcee56f9dc357b2023bb9694c13267a02f.tar.gz master-187ad058-fd034dbcee56f9dc357b2023bb9694c13267a02f.tar.bz2 master-187ad058-fd034dbcee56f9dc357b2023bb9694c13267a02f.zip |
broadcom-diag: show error message in case something goes wrong with gpio irq
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37668 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel')
-rw-r--r-- | package/kernel/broadcom-diag/src/diag.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/package/kernel/broadcom-diag/src/diag.c b/package/kernel/broadcom-diag/src/diag.c index c2a0d09194..1fad586c52 100644 --- a/package/kernel/broadcom-diag/src/diag.c +++ b/package/kernel/broadcom-diag/src/diag.c @@ -1424,13 +1424,20 @@ static inline void ssb_maskset32(struct ssb_device *dev, static void gpio_set_irqenable(int enabled, irqreturn_t (*handler)(int, void *)) { int irq; + int err; irq = gpio_to_irq(0); - if (irq == -EINVAL) return; + if (irq < 0) { + pr_err("no irq for gpio available\n"); + return; + } if (enabled) { - if (request_irq(irq, handler, IRQF_SHARED, "gpio", handler)) + err = request_irq(irq, handler, IRQF_SHARED, "gpio", handler); + if (err) { + pr_err("can not reqeust irq\n"); return; + } } else { free_irq(irq, handler); } |