All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] net: make ndev->irq signed for error handling
@ 2013-11-07  7:48 ` Dan Carpenter
  0 siblings, 0 replies; 14+ messages in thread
From: Dan Carpenter @ 2013-11-07  7:48 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, linux-kernel, kernel-janitors

There is a bug in cpsw_probe() where we do:

	ndev->irq = platform_get_irq(pdev, 0);
	if (ndev->irq < 0) {

The problem is that "ndev->irq" is unsigned so the error handling
doesn't work.  I have changed it to a regular int.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9da6a04..bb011f6 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1132,7 +1132,7 @@ struct net_device {
 	unsigned long		mem_end;	/* shared mem end	*/
 	unsigned long		mem_start;	/* shared mem start	*/
 	unsigned long		base_addr;	/* device I/O address	*/
-	unsigned int		irq;		/* device IRQ number	*/
+	int			irq;		/* device IRQ number	*/
 
 	/*
 	 *	Some hardware also needs these fields, but they are not

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

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

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07  7:48 [patch] net: make ndev->irq signed for error handling Dan Carpenter
2013-11-07  7:48 ` Dan Carpenter
2013-11-07 12:14 ` Mugunthan V N
2013-11-07 12:26   ` Mugunthan V N
2013-11-07 12:22   ` Dan Carpenter
2013-11-07 12:22     ` Dan Carpenter
2013-11-07 16:33     ` Mugunthan V N
2013-11-07 16:45       ` Mugunthan V N
2013-11-08  8:41       ` Dan Carpenter
2013-11-08  8:41         ` Dan Carpenter
2013-11-08  9:18         ` Mugunthan V N
2013-11-08  9:30           ` Mugunthan V N
2013-11-08  0:13 ` David Miller
2013-11-08  0:13   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.