]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/mailbox/omap: make mbox->irq signed for error handling
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 16 Dec 2013 23:45:20 +0000 (10:45 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 16 Dec 2013 23:45:20 +0000 (10:45 +1100)
There is a bug in omap2_mbox_probe() where we try do:

mbox->irq = platform_get_irq(pdev, info->irq_id);
if (mbox->irq < 0) {

The problem is that mbox->irq is unsigned so the error handling doesn't
work.  I've changed it to a signed integer.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Suman Anna <s-anna@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/mailbox/omap-mbox.h

index 6cd38fc685994b025c74689e324481bcf7b2b6b1..86d7518cd13b2c07b27b6931042e1d3c7b10529d 100644 (file)
@@ -52,7 +52,7 @@ struct omap_mbox_queue {
 
 struct omap_mbox {
        const char              *name;
-       unsigned int            irq;
+       int                     irq;
        struct omap_mbox_queue  *txq, *rxq;
        struct omap_mbox_ops    *ops;
        struct device           *dev;