Skip to contentSkip to conversation

mailbox/omap: make mbox->irq signed for error handling

PATCH In review Dan Carpenter 2 participants 2 messages Nov 7, 2013 – Nov 11, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mailbox/omap: make mbox->irq signed for error handling

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.

drivers/mailbox/omap-mbox.h +1 -1
index 6cd38fc..86d7518 100644
@@ -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;
#1 lore raw
Quoted 9 lines · Dan Carpenter

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.

LGTM, thanks for the fix.

regards
Suman