linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] mailbox/omap: make mbox->irq signed for error handling
@ 2013-11-07  7:49 Dan Carpenter
  2013-11-11 23:07 ` Suman Anna
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-11-07  7:49 UTC (permalink / raw)
  To: Suman Anna
  Cc: Greg Kroah-Hartman, Omar Ramirez Luna, linux-kernel, kernel-janitors

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>

diff --git a/drivers/mailbox/omap-mbox.h b/drivers/mailbox/omap-mbox.h
index 6cd38fc..86d7518 100644
--- a/drivers/mailbox/omap-mbox.h
+++ b/drivers/mailbox/omap-mbox.h
@@ -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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] mailbox/omap: make mbox->irq signed for error handling
  2013-11-07  7:49 [patch] mailbox/omap: make mbox->irq signed for error handling Dan Carpenter
@ 2013-11-11 23:07 ` Suman Anna
  0 siblings, 0 replies; 2+ messages in thread
From: Suman Anna @ 2013-11-11 23:07 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Greg Kroah-Hartman, Omar Ramirez Luna, linux-kernel,
	kernel-janitors, tony


On 11/07/2013 01:49 AM, Dan Carpenter wrote:
> 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>

LGTM, thanks for the fix.

regards
Suman

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-11 23:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-07  7:49 [patch] mailbox/omap: make mbox->irq signed for error handling Dan Carpenter
2013-11-11 23:07 ` Suman Anna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).