[Patch] Patch for bug #13853

From: jinqiu yang
Date: Wed Mar 02 2011 - 16:13:53 EST


Hi everyone,

There is a patch generated by the tool R2Fix for bug #13853.
The problem still exist in latest version.
Could you please take a look at them? Thanks!

--- linux-2.6.30/drivers/net/ariadne.c 2009-06-09 23:05:27.000000000 -0400
+++ /tmp/cocci-output-13571-c63aba-ariadne.c 2011-02-21 17:50:37.625039103 -0500
@@ -421,7 +421,7 @@ static inline void ariadne_reset(struct
static irqreturn_t ariadne_interrupt(int irq, void *data)
{
struct net_device *dev = (struct net_device *)data;
- volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
+ volatile struct Am79C960 *lance;
struct ariadne_private *priv;
int csr0, boguscnt;
int handled = 0;
@@ -430,6 +430,7 @@ static irqreturn_t ariadne_interrupt(int
printk(KERN_WARNING "ariadne_interrupt(): irq for unknown device.\n");
return IRQ_NONE;
}
+ lance = (struct Am79C960 *)dev->base_addr;

lance->RAP = CSR0; /* PCnet-ISA Controller Status */


Best,
Jinqiu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/