Message ID | Pine.LNX.4.64.1004021447160.17695@ask.diku.dk |
---|---|
State | Accepted |
Commit | 258006d1abcf3f2990d3ebd77d75af335ff24d81 |
Headers | show |
On Fri, 2010-04-02 at 14:47 +0200, Julia Lawall wrote: > From: Julia Lawall <julia@diku.dk> > > Moved the debugging message before the call to map_destroy, which frees its > argument. The message is also slightly changed to reflect its new > position. > > A simplified version of the semantic patch that finds this problem is as > follows: (http://coccinelle.lip6.fr/) Pushed to l2-mtd-2.6.git, thanks.
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index 87b2b8f..3e339de 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c @@ -689,8 +689,8 @@ static void pcmciamtd_detach(struct pcmcia_device *link) if(dev->mtd_info) { del_mtd_device(dev->mtd_info); + info("mtd%d: Removing", dev->mtd_info->index); map_destroy(dev->mtd_info); - info("mtd%d: Removed", dev->mtd_info->index); } pcmciamtd_release(link);